Re: [Python-ideas] [Python-Dev] Dict access with double-dot (syntactic sugar)

On Fri, Mar 25, 2011 at 9:00 AM, Jameson Quinn <jameson.quinn@gmail.com> wrote:
Gut reaction: Dear gods, how and why does * have a . operator, and why is there a function being called on it?!? Huh; x,y,z aren't defined in that scope, that's gotta return a NameError for sure. Or wait, is that some new way to specify a vector for multiplication? When did Python get a vector type and literal? If punctuation is the answer, Perl is the question. Since this is Python, and punctuation is decidedly not the answer, I'm going to go a little further than before: -sys.maxint Regards, - Josiah

2011/3/25 Josiah Carlson <josiah.carlson@gmail.com>
OK. As I said, I think that the existing functionality as I showed in expect_a_chair solves my dislike for using quotes for something which logically is an attribute name. (It would be even better if json had a way to distinguish object-like data, with well-defined parameters, from more free-form data, but that is out of scope here.) Jameson ps. A true masochist could do something like my unpacking '*.' by a horrendous abuse of the lambda syntax: (lambda x,y,z,e=None, **kw:oh_please_god_no(locals()))(**d) I leave the definition of oh_please_god_no as an exercise for the reader. :)

2011/3/25 Josiah Carlson <josiah.carlson@gmail.com>
OK. As I said, I think that the existing functionality as I showed in expect_a_chair solves my dislike for using quotes for something which logically is an attribute name. (It would be even better if json had a way to distinguish object-like data, with well-defined parameters, from more free-form data, but that is out of scope here.) Jameson ps. A true masochist could do something like my unpacking '*.' by a horrendous abuse of the lambda syntax: (lambda x,y,z,e=None, **kw:oh_please_god_no(locals()))(**d) I leave the definition of oh_please_god_no as an exercise for the reader. :)
participants (3)
-
Ethan Furman
-
Jameson Quinn
-
Josiah Carlson