# Populate Value List updated to Python 3

**URL:** <https://discourse.mcneel.com/t/populate-value-list-updated-to-python-3/180201>\
**Category:** Grasshopper\
**Tags:** windows, python\
**Created:** [April 16, 2024, 4:08pm UTC](https://discourse.mcneel.com/t/populate-value-list-updated-to-python-3/180201 "2024-04-16T16:08:12Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [April 17, 2024, 9:40pm UTC](https://discourse.mcneel.com/t/populate-value-list-updated-to-python-3/180201/24 "2024-04-17T21:40:10Z")

</div>

> [@eirannejad](#):
>
> Yes. it is better to use `isinstance` for type checking in python.

Oh? That implies the same code will work in IronPython 2? And it does ‼

This version has the same source in both versions, [same as what I linked to](https://discourse.mcneel.com/t/setting-the-entries-in-a-value-list/110781/51), now using `isinstance(obj, gh.Kernel.Special.GH_ValueList)` instead of `type(obj)`.

[PVL\_2024Apr17a.gh](https://discourse.mcneel.com/uploads/short-url/lIRjM3G6FBXeRYGiLKsIg9TSXbA.gh) (14.7 KB)

---

_[View the full topic](https://discourse.mcneel.com/t/populate-value-list-updated-to-python-3/180201)._
