Re: [Python-ideas] namedtuple literals [Was: RE a new namedtuple]

2017-07-21 Thread Michel Desmoulin
Having to define objects for scripts or small projects is really adding a burden. A namedtuple litteral strike the perferfect balance between expressivity and concision for those cases. Le 21/07/2017 à 17:18, Guido van Rossum a écrit : > Honestly I would like to declare the bare (x=1, y=0)

Re: [Python-ideas] namedtuple literals [Was: RE a new namedtuple]

2017-07-21 Thread Juancarlo Añez
> Honestly I would like to declare the bare (x=1, y=0) proposal dead. Let's > encourage the use of objects rather than tuples (named or otherwise) for > most data exchanges. I know of a large codebase that uses dicts instead of > objects, and it's a mess. I expect the bare ntuple to encourage the

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-21 Thread David Mertz
On Fri, Jul 21, 2017 at 10:19 AM, Brett Cannon wrote: > On Fri, 21 Jul 2017 at 10:08 Jason H wrote: > >> I experimented with Python in college and I've been for close to 20 years >> now. (Coming and going as needed) I love the language. But there is one >>

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-21 Thread Jelle Zijlstra
2017-07-21 10:07 GMT-07:00 Jason H : > I experimented with Python in college and I've been for close to 20 years > now. (Coming and going as needed) I love the language. But there is one > annoyance that I continually run into. > > There are basically two assignment operators,

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-21 Thread Brett Cannon
On Fri, 21 Jul 2017 at 10:08 Jason H wrote: > I experimented with Python in college and I've been for close to 20 years > now. (Coming and going as needed) I love the language. But there is one > annoyance that I continually run into. > > There are basically two assignment

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-21 Thread Rhodri James
On 21/07/17 18:07, Jason H wrote: There are basically two assignment operators, based on context, = and : a = 1 { a: 1 } No there aren't. The colon isn't assigning at all, it's separating a key from a corresponding value. The object referenced by 'a' is unchanged by being part of a

[Python-ideas] Idea : for smarter assignment?

2017-07-21 Thread Jason H
I experimented with Python in college and I've been for close to 20 years now. (Coming and going as needed) I love the language. But there is one annoyance that I continually run into. There are basically two assignment operators, based on context, = and : a = 1 { a: 1 } They cannot be

Re: [Python-ideas] namedtuple literals [Was: RE a new namedtuple]

2017-07-21 Thread Guido van Rossum
Honestly I would like to declare the bare (x=1, y=0) proposal dead. Let's encourage the use of objects rather than tuples (named or otherwise) for most data exchanges. I know of a large codebase that uses dicts instead of objects, and it's a mess. I expect the bare ntuple to encourage the same

Re: [Python-ideas] namedtuple literals [Was: RE a new namedtuple]

2017-07-21 Thread Koos Zevenhoven
On Fri, Jul 21, 2017 at 8:49 AM, Serhiy Storchaka wrote: > 20.07.17 04:35, Alexander Belopolsky пише: > >> On Wed, Jul 19, 2017 at 9:08 PM, Guido van Rossum >> wrote: >> >>> The proposal in your email seems incomplete >>> >> >> The proposal does not say