None assigment
Fredrik Lundh
fredrik at pythonware.com
Sun Feb 18 16:35:37 EST 2001
More information about the Python-list mailing list
Sun Feb 18 16:35:37 EST 2001
- Previous message (by thread): None assigment
- Next message (by thread): None assigment
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thomas Wouters wrote:
> It's *mostly* harmless. Consider
>
> spam, None, eggs, None = string.split("this is a string")
> viking = filter(None, (spam, eggs))
now put them both in the same function, with the filter
statement on line 5 and the split on line 65.
trust me, you can waste lots of time trying to figure out
what causes that "NameError: None" message on line 5...
Cheers /F
- Previous message (by thread): None assigment
- Next message (by thread): None assigment
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list