|
Re: Sky pie: a "var" keyword: msg#00032python.python-3000.devel
Fredrik Lundh wrote: > Neil Toronto wrote: > >> A "var" keyword fixes them all. The "global" gotcha: >> >> x = 0 >> def f(): >> print x # no exception - prints "0" >> x = 3 >> >> def g(): >> print x # exception >> var x = 3 > > what are the exact semantics of "var" ? are you saying that local variables > should be global by default? They wouldn't be "local" unless declared with "var", I assume. Georg |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Sky pie: a "var" keyword: 00032, Fredrik Lundh |
|---|---|
| Next by Date: | Re: Sky pie: a "var" keyword: 00032, Jim Jewett |
| Previous by Thread: | Re: Sky pie: a "var" keywordi: 00032, Fredrik Lundh |
| Next by Thread: | Re: ugly pie: a "var" keyword: 00032, Antoine Pitrou |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |