On Wednesday, November 2, 2011 11:46:49 AM UTC-4, Carlos wrote:
>
> Hi,
>
> I'm using Storage objects throughout my code, and compare vs None values
> to perform certain specific actions.
>
In your code, can you use the attribute access method, which will return
None when the attribute doesn't exist:
myobj.mykey is None
will be true if mykey doesn't exist. Or do you need to use the
myobj['mykey'] method because the key is stored in a variable or something
like that? In the latter case, I suppose there are other possibilities,
such as
mykey in myobj
>
> Thanks!,
>
> Carlos
>
>