Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #28910
| References | <CAN1F8qXpeHAQGJG9urY2NjL_01gX++cMhkgiD3mt3nZsYzYcJQ@mail.gmail.com> <CAPTjJmqh8V9kZm3bQ-BHGDc-qsEuxykh8DCg4s3z5x+JcxW-WA@mail.gmail.com> <CAN1F8qUuXho43hPdGKyh3sAyZHx7JegFfSEU+JhqwyA552a=DA@mail.gmail.com> |
|---|---|
| Date | 2012-09-12 08:52 +1000 |
| Subject | Re: Double sided double underscored variable names |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.526.1347403933.27098.python-list@python.org> (permalink) |
On Wed, Sep 12, 2012 at 8:48 AM, Joshua Landau <joshua.landau.ws@gmail.com> wrote: > Well, the problem is that a lot of collisions aren't predictable. > "locals()['foo'] = 2", for example. If it weren't for Python's annoying > flexibility* I would definitely do something very close to what you suggest. > Remember that "locals()" isn't Python's only introspection tool. How about > "from foo import *"? You're not supposed to mutate locals(), but I suppose globals() works the same way. Inline functions? I like this idea. I tend to want them in pretty much any language I write in. ChrisA
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Double sided double underscored variable names Chris Angelico <rosuav@gmail.com> - 2012-09-12 08:52 +1000
Re: Double sided double underscored variable names Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-12 01:14 +0000
Re: Double sided double underscored variable names Chris Angelico <rosuav@gmail.com> - 2012-09-12 14:12 +1000
Re: Double sided double underscored variable names Joshua Landau <joshua.landau.ws@gmail.com> - 2012-09-12 10:55 +0100
csiph-web