Assignments and Variable Substitution
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Tue Aug 14 06:37:17 EDT 2007
Ali a écrit :
> On Aug 14, 12:45 am, Steve Holden <st... at holdenweb.com> wrote:
>> Evan Klitzke wrote:
>>> On 8/13/07, brad <byte8b... at gmail.com> wrote:
>>>> I'd like to do something like this:
>>>> var = '123'
>>>> %s = [], %var
>
>> And why would you want a variable whose name is '123'?
>
> ... and thus continues the search for private variables in Python.
I must be tired, but I don't see what this has to do with "private"
variables.
But if you want private variables, it's quite easy: prefix their names
with a single underscore.
More information about the Python-list
mailing list