On Fri, Jan 31, 2020 at 9:50 PM Richard Damon
On 1/31/20 9:28 PM, Christopher Barker wrote:
I am really confused by this whole thread:
<snio>
My understanding is that the impetus of the request is that if you start from an expression like nameof(foo.bar) to get to "bar" then if you refactor your code you have a chance that the tool will be able to see the variable expression foo.bar, and process that like other references to the item, and thus be able to change it. Just using the string "bar" would be very hard to see the connection between foo.bar and "bar".
Huh? you only njeed to know the name of something as a string is yuou are doing metaprogramming of some sort -- which is a great feature, but not everyday code. So someone wants this so that they can more easily *refactor* code that isn't very common? I'm betting even more cofused. And no one answered my questions about what it would do in all the, very common cases where an object doesn't ahve a name, opr more than one. More confused than ever...... - CHB -- Christopher Barker, PhD Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython