I dont think his question has anything to do with pymel. My point was
if you use the if statement as designed it doesnt matter what the
value is that is returned. Python returns True if the value is usable
and false if it is not. Dont get me wrong I took a look at pymel and
you guys are doing some great things with it.

None    ==      False
0               ==      False
1               ==      True
2               ==      True
[]              ==      False
[0]             ==      True
{}              ==      False
{1:1}           ==      True
()              ==      False
(1)             ==      True



On Feb 6, 2:29 pm, chadrik <[email protected]> wrote:
> use pymel  :)
>
> On Feb 6, 2009, at 1:25 PM, yury nedelin wrote:
>
> > let say
>
> > mc.select(clear=1)
> > print mc.ls(sl=1)
> > >>None
>
> > I have to check if its "None" or a list if I want to do a For loop  
> > anything else with the List
>
> > Are there better ways than checking  >> if "None" >> all the time ?
>
> > Thanks
> > Yury
--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to