Issue 20099: a new idea (original) (raw)
Issue20099
Created on 2013-12-31 15:18 by niacdoial, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (4) | ||
---|---|---|
msg207118 - (view) | Author: Liam Marsh (niacdoial) | Date: 2013-12-31 15:18 |
idea: var(): input var name (str), outputs var value useful for(example in a chess program): >>>count=1 >>>while count<=8: ... var('a', count)='black queen' ... count=count+1 | ||
msg207119 - (view) | Author: Ezio Melotti (ezio.melotti) * ![]() |
Date: 2013-12-31 15:30 |
You should propose this to the python-ideas mailing list, but from your description is not clear to me what you want. Can you try to explain it more in detail? Are you asking for a new function that accepts the name of a variable as a string and prints its value? Or for a function that creates dynamically a new "variable name"? If you want to dynamically create variable names, it's better to just use a dictionary instead, e.g.: d = {} for count in range(1, 9): name = 'a' + str(count) d[name] = 'black queen' | ||
msg207123 - (view) | Author: Liam Marsh (niacdoial) | Date: 2013-12-31 16:03 |
first, it was for the second idea, which can be replaced, but maybe sameone needs it, when you reed theese lines, this idea is sent. meen while, have a happy new year. | ||
msg207129 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2014-01-01 01:56 |
This isn't a bug, please use https://mail.python.org/mailman/listinfo/python-ideas if you want to propose ideas. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:56 | admin | set | github: 64298 |
2014-01-01 01:56:22 | pitrou | set | status: open -> closednosy: + pitroumessages: + resolution: not a bugstage: resolved |
2013-12-31 16:03:11 | niacdoial | set | status: pending -> openmessages: + |
2013-12-31 15:30:49 | ezio.melotti | set | status: open -> pendingversions: + Python 3.5, - Python 3.3nosy: + ezio.melottimessages: + |
2013-12-31 15🔞51 | niacdoial | create |