Re: [Python-ideas] Dictionary destructing and unpacking.

2017-06-07 Thread Matt Gilson
7;, 'b', 100) > >>> a, b, c > (1, None, 'Foo') > > > E. > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http:

Re: [Python-ideas] dict(default=int)

2017-05-29 Thread Matt Gilson
gt;> >> -- >> >> Christopher Barker, Ph.D. >> Oceanographer >> >> Emergency Response Division >> NOAA/NOS/OR&R(206) 526-6959 voice >> 7600 Sand Point Way NE (206) 526-6329 fax >> Seattle, WA 98115 (206) 526-63

Re: [Python-ideas] Augmented assignment syntax for objects.

2017-04-25 Thread Matt Gilson
ls really unexpected to all of a sudden give my tuple a temporary name and have the code behave in a dramatically different fashion. > > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python

Re: [Python-ideas] get() method for list and tuples

2017-03-03 Thread Matt Gilson
On Fri, Mar 3, 2017 at 1:35 PM, Michel Desmoulin wrote: > > > Le 03/03/2017 à 22:21, Chris Barker a écrit : > > On Fri, Mar 3, 2017 at 12:21 PM, Sven R. Kunze > > wrote: > > > >> For my part, I think casting a list to a dict is often the RIGHT > >> way to address

Re: [Python-ideas] For/in/as syntax

2017-03-03 Thread Matt Gilson
so I couldn't > yet > think about the implications of such a new syntax to this (and what > about a > lazy keyword in here?) > - I suppose it's a huge work to create such a syntax. And I have no idea > how > complicated it could be to create methods (like break() and c

Re: [Python-ideas] Expose a child factory using MappingProxyType in builtins

2017-02-28 Thread Matt Gilson
t;>> Code of Conduct: http://python.org/psf/codeofconduct/ >>> >> >> >> ___ >> Python-ideas mailing list >> Python-ideas@python.org >> https://mail.python.org/mailman/listinfo/python-ideas >> Code of

Re: [Python-ideas] Fwd: Define a method or function attributeoutsideof a class with the dot operator

2017-02-13 Thread Matt Gilson
_ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- [image: pattern-sig.png] Matt Gilson // SOFTWARE ENGINEER E: m..

Re: [Python-ideas] incremental hashing in __hash__

2017-01-05 Thread Matt Gilson
gt; ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- [image: p

Re: [Python-ideas] incremental hashing in __hash__

2017-01-05 Thread Matt Gilson
behaves like a classmethod when called from the class, and like >> an instance method when called from an instance); >> >> * changing tuple.__hash__ from an ordinary method to one of the >> above special methods; >> >> * and likewise for frozenset.__

Re: [Python-ideas] Enhancing vars()

2016-12-13 Thread Matt Gilson
> It also refers to local and global variables, as vars() is effectively > an alias for locals() if you don't pass an argument, and locals() is > effectively an alias for globals() at module level: > > https://www.getpattern.com/meetpattern> to sign up! __

Re: [Python-ideas] Null coalescing operator

2016-11-02 Thread Matt Gilson
ve done otherwise. > > What needs to be decided is whether such use cases are frequent > enough to justify special syntax. > > -- > Greg > > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mai

Re: [Python-ideas] Python multi-dimensional array constructor

2016-10-19 Thread Matt Gilson
d supplement the existing approach, it > doesn't replace it. np.ndarray() would stay around just like list() stays > around for cases where it makes sense. > > > ___ > Python-ideas mailing list > Python-ideas@python.org >

Re: [Python-ideas] Shuffled

2016-09-07 Thread Matt Gilson
t this behavior for "sorted"? That makes no sense at >>> all. >>> >> Of course it does. The only analogy to random.shuffle(big_list) >> returning None that makes a lick of sense here is that big_list.sort() >> also returns None. IF a `shuffled()` functi