Life's better without braces
Gerrit Holl
gerrit.holl at pobox.com
Mon Feb 21 15:11:45 EST 2000
More information about the Python-list mailing list
Mon Feb 21 15:11:45 EST 2000
- Previous message (by thread): Life's better without braces
- Next message (by thread): Life's better without braces
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello all,
I have a problem. In my Python enthuishasm, I ripped off the braces
from my keyboard because I thought I didn't need them.
Unfortunately, I have a problem now. I can't create dictionairies any
more! And because braces aren't the only keys on the brace key,
I can't create lists either. The solution for the latter is list(()),
but how do I create an empty dictionairy without braces?
I know I can do:
>>> import os
>>> d=os.environ.data
>>> for k in d.keys():
... del d[k]
...
>>> d
{}
But is there a more efficient way to do it? Does the 'new' modules has
something I want?
HELP!
If I'll rip off the ';' too, I won't be able to type blocks any more,
since I won't be able to type a ':' either. Hmm, is it safe to rip
off the '$'? I don't need a '4'!
regards,
Gerrit.
- Previous message (by thread): Life's better without braces
- Next message (by thread): Life's better without braces
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list