Obscenely long variable names
Posted: Sat Feb 27, 2016 6:14 am
No, I don't use variables names like this but I was testing a thought.
While the little PyBoard held up, I'm more worried about the integrity of RAM at this point. Tab expansion wasn't working on the longest variable name. Just thought I'd throw this out to you developers.
Code: Select all
MicroPython v1.6 on 2016-02-01; PYBv1.0 with STM32F405RG
Type "help()" for more information.
>>> AReallyLongVariableNameThatIsNotAllThatUseful = 42
>>> dir()
['c', 'AReallyLongVariableNameThatIsNotAllThatUseful', '__name__', 'machine', 'pyb', 'Candle']
>>> x="FooBarBazQuux"*20
>>> x
'FooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuuxFooBarBazQuux'
>>> exec("%s = 69" % x)
>>> dir()
['machine', 'pyb', 'c', 'Candle', 'x', '__name__', 'FooB', 'AReallyLongVariableNameThatIsNotAllThatUseful']
>>> FooB
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'FooB' is not defined
>>> FooBa
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'FooBa' is not defined
>>>