Re: [Python-ideas] Trial balloon: adding variable type declarations in support of PEP 484

2016-08-09 Thread Guido van Rossum
> runtime semantics? Correct, but we can invent a new base class that has these semantics. It's no different from Enum. Anyway, I think this will have to be an add-on to be designed after the basics are done. -- --Guido van Rossum (python.org/~guido) ___ Py

Re: [Python-ideas] Allow manual creation of DirEntry objects

2016-08-17 Thread Guido van Rossum
com> > wrote: > > 2016-08-17 1:50 GMT+02:00 Guido van Rossum <gu...@python.org>: > >> We could expose the class with a > >> constructor that always fails (the C code could construct instances > through > >> a backdoor). > > > > Oh, in

Re: [Python-ideas] "Immutable Builder" Pattern and Operator

2017-01-23 Thread Guido van Rossum
g language features. That is okay, you are learning it here. But perhaps you should take the hint from the large number of people here who have gently tried to explain to you that while this is a good idea, it's not a great idea, and there's no sufficiently important use case to make up for the con

Re: [Python-ideas] globals should accept parenteses for extending beyond 1 line

2017-01-23 Thread Guido van Rossum
___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido)

Re: [Python-ideas] Fused multiply-add (FMA)

2017-01-16 Thread Guido van Rossum
Does numpy support this? --Guido (mobile) On Jan 16, 2017 7:27 AM, "Stephan Houben" wrote: > Hi Steve, > > Very good! > Here is a version which also handles the nan's, infinities, > negative zeros properly. > > === > import math > from fractions import

Re: [Python-ideas] Ideas for improving the struct module

2017-01-19 Thread Guido van Rossum
Nevertheless the C meaning *is* the etymology of the module name. :-) --Guido (mobile) On Jan 19, 2017 16:54, "Chris Angelico" wrote: > On Fri, Jan 20, 2017 at 11:38 AM, Steven D'Aprano > wrote: > > On Fri, Jan 20, 2017 at 05:16:28AM +1100, Chris

Re: [Python-ideas] Ideas for improving the struct module

2017-01-20 Thread Guido van Rossum
I'd be wary of making a grab-bag of small improvements, it encourages bikeshedding. --Guido (mobile) On Jan 20, 2017 10:16 AM, "Ethan Furman" wrote: > On 01/20/2017 10:09 AM, Joao S. O. Bueno wrote: > >> On 20 January 2017 at 16:51, Elizabeth Myers wrote: >> > > Should I

Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-19 Thread Guido van Rossum
quote, since that's where a potential change would cause breakage. (Or we could leave that to the linters.) -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread Guido van Rossum
ions is much higher than that of the > "human-readable" output. That would seem to apply to "space used" but not to "space available". -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@pyth

Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-30 Thread Guido van Rossum
, so you might as well stop debating and save all the onlookers the embarrassment.) -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct

Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-30 Thread Guido van Rossum
not. However it's a huge change conceptually and implementation-wise, and I don't blame Eric if he doesn't want to be responsible for it. So it has to be a new PEP, to be introduced in 3.7 at the earliest. -- --Guido van Rossum (python.org/~guido

Re: [Python-ideas] real numbers with SI scale factors

2016-08-30 Thread Guido van Rossum
most people would do a double-take. > This is really only an issue with output. So maybe the proposal should be toned down to just a way to request SI units when formatting numbers? -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing li

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-31 Thread Guido van Rossum
ineering" style where exponents are always a multiple of 3.) > The existing "alternate form" marker in string formatting could be > used to request the use of the base 2 scaling prefixes rather than the > base 10 ones: "#h". Not sure about this one. -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Fwd: Null coalescing operator

2016-09-11 Thread Guido van Rossum
le I desperately want to write it as return "Illegal Argument" + (self.message && (": " + self.message) || "") Note that I already know the relative priorities of && and ||, so I can drop a set of parentheses. > Would this satisfy most of the people

Re: [Python-ideas] Fwd: Null coalescing operator

2016-09-11 Thread Guido van Rossum
t applies) is that if `a` is in fact something more complex, like `f(a)`, repeating it twice sounds like a performance penalty, and that's where `f(a)?.foo` really shines. -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@p

Re: [Python-ideas] New Python syntax for continuing definitions for existing classes

2016-09-14 Thread Guido van Rossum
or at the point of definition that the affected class is >> extensible (i.e. the use of the custom metaclass, or inheritance from >> a base class that uses it) and hence that the given definition may be >> incomplete >> >> Cheers, >> Nick. >> >> -- >

Re: [Python-ideas] Changing optimisation level from a script

2016-09-09 Thread Guido van Rossum
raise an exception > > What do you think? Sorry if this has been discussed before! > > Cheers, > Damien. > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-idea

Re: [Python-ideas] Null coalescing operator

2016-09-10 Thread Guido van Rossum
On Sat, Sep 10, 2016 at 11:09 AM, MRAB <pyt...@mrabarnett.plus.com> wrote: > On 2016-09-10 18:44, Paul Moore wrote: >> >> On 10 September 2016 at 18:26, Guido van Rossum <gu...@python.org> wrote: >>> >>> IMO the key syntax is >>> simp

Re: [Python-ideas] Null coalescing operator

2016-09-10 Thread Guido van Rossum
On Sat, Sep 10, 2016 at 4:27 PM, Chris Angelico <ros...@gmail.com> wrote: > On Sun, Sep 11, 2016 at 9:10 AM, Guido van Rossum <gu...@python.org> wrote: >> So you're offering `NoneCoalesce(x).bar` as less-ugly alternative to >> `x?.bar`... Color me unconvinc

Re: [Python-ideas] Fwd: Null coalescing operator

2016-09-10 Thread Guido van Rossum
gt; wrote: > Sorry, I sent this accidentally as private reply, then tried to fix it on > phone. The latter produced horrible formatting. Please just read this > version. > > On Sat, Sep 10, 2016 at 4:10 PM, Guido van Rossum <gu...@python.org> wrote: >> >> So you

Re: [Python-ideas] Fwd: Null coalescing operator

2016-09-10 Thread Guido van Rossum
No. PEP 505 actually solves the problem without ever catching AttributeError. Please read it. On Sat, Sep 10, 2016 at 5:15 PM, David Mertz <me...@gnosis.cx> wrote: > On Sep 10, 2016 4:45 PM, "Guido van Rossum" <gu...@python.org> wrote: >> >> There seems to be

Re: [Python-ideas] Null coalescing operator

2016-09-10 Thread Guido van Rossum
; On Sat, Sep 10, 2016 at 3:21 PM, David Mertz <me...@gnosis.cx> wrote: >> >> I find the '?.' syntax very ugly, much more so in the examples of chained >> attributes. >> >> A much better way to handle the use case is to wrap objects in a class >> that gives

Re: [Python-ideas] Fwd: Null coalescing operator

2016-09-10 Thread Guido van Rossum
ere feels like even less > motivation for new syntax. > > > On Sep 10, 2016 6:29 PM, "MRAB" <pyt...@mrabarnett.plus.com> wrote: >> >> On 2016-09-11 02:02, David Mertz wrote: >>> >>> On Sat, Sep 10, 2016 at 5:23 PM, Guido van Rossum <gu...@pyt

Re: [Python-ideas] An exciting opportunity to update PEP 3156

2016-09-12 Thread Guido van Rossum
does this have? Task.get_current_task() can return None. -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Naming convention for Enums

2016-09-15 Thread Guido van Rossum
ll-caps, since they're most often going to be > representing constant integers, per Guido's post. I don't know of > _any_ real-world cases where they're not integers, though there are > some examples in the docs. Amen. > ChrisA > > [1] https://docs.python.org/3/library/e

Re: [Python-ideas] Flagging blocking functions not to be used with asyncio

2016-10-07 Thread Guido van Rossum
On Fri, Oct 7, 2016 at 9:52 AM, Yury Selivanov <yselivanov...@gmail.com> wrote: > On 2016-10-07 11:16 AM, Guido van Rossum wrote: > >> Maybe a simpler approach would be to write a linter that checks for a >> known list of common blocking functions, and anything that call

Re: [Python-ideas] Flagging blocking functions not to be used with asyncio

2016-10-07 Thread Guido van Rossum
nd it's not clear how you'd even raise an exception at that point. Maybe a simpler approach would be to write a linter that checks for a known list of common blocking functions, and anything that calls those automatically gets the same property? -- --Guido van Rossum (python.org/~guido) _

Re: [Python-ideas] PEP8 dictionary indenting addition

2016-10-08 Thread Guido van Rossum
Makes sense, maybe you can send a PR to the Python/peps repo? --Guido (mobile) On Oct 8, 2016 12:27 PM, "Jelte Fennema" wrote: > I have an idea to improve indenting guidelines for dictionaries for better > readability: If a value in a dictionary literal is placed on a new line,

Re: [Python-ideas] PEP8 dictionary indenting addition

2016-10-08 Thread Guido van Rossum
Might also send something to pystylechecker at the same time. --Guido (mobile) On Oct 8, 2016 1:23 PM, "Jelte Fennema" <m...@jeltef.nl> wrote: > Alright, I'll make one when I have some time in the near future. > > On 8 Oct 2016 10:08 pm, "Guido van Rossum

Re: [Python-ideas] async objects

2016-10-04 Thread Guido van Rossum
ill trying to figure out my position on the other points of discussion here -- keep discussing! -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ide

Re: [Python-ideas] Make partial a built-in

2016-09-20 Thread Guido van Rossum
r. This surprised me but it wa what I measured (in one particular case). > Elazar > > בתאריך יום ג׳, 20 בספט' 2016, 18:20, מאת Guido van Rossum ‏< > gvanros...@gmail.com>: > >> I am radically opposed to this proposal. Every time I

Re: [Python-ideas] Make partial a built-in

2016-09-20 Thread Guido van Rossum
I am radically opposed to this proposal. Every time I see a partial application I wonder endlessly about what's going on. --Guido (mobile) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code

Re: [Python-ideas] SI scale factors alone, without units or dimensional analysis

2016-08-26 Thread Guido van Rossum
are some complexities that have been glossed over. > [...] > Please curb your enthusiasm. This is not going to happen. -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman

Re: [Python-ideas] Atomic counter / atomic increment

2016-08-25 Thread Guido van Rossum
k using *iter*tools is a pretty > non-obvious way to get a thread-safe counter. > > -Ben > > > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ide

Re: [Python-ideas] Null coalescing operator

2016-10-14 Thread Guido van Rossum
I'm not usually swayed by surveys -- Python is not a democracy. Maybe a bunch of longer examples would help all of us see the advantages of the proposals. On Fri, Oct 14, 2016 at 8:09 PM, Mark E. Haase <meha...@gmail.com> wrote: > On Fri, Oct 14, 2016 at 12:10 PM, Guido van R

Re: [Python-ideas] PEP 505 -- None-aware operators

2016-10-14 Thread Guido van Rossum
On Fri, Oct 14, 2016 at 6:37 AM, Gustavo Carneiro <gjcarne...@gmail.com> wrote: > I see. short-circuiting is nice to have, sure. No. Short-circuiting is the entire point of the proposed operators. -- --Guido van Rossum (python.org/~guido) _

Re: [Python-ideas] Decorator to avoid a mistake

2016-11-25 Thread Guido van Rossum
Something like mypy could then enforce its use. But an IDE could also just highlight method overrides differently, maybe PyCharm or PyDev already do that?) -- --Guido van Rossum (python.org/~guido <http://python.org/%7Eguido>) ___ Python-ideas

Re: [Python-ideas] Decorator to avoid a mistake

2016-11-28 Thread Guido van Rossum
On Mon, Nov 28, 2016 at 1:32 PM, Chris Barker <chris.bar...@noaa.gov> wrote: > On Mon, Nov 28, 2016 at 10:22 AM, Guido van Rossum <gu...@python.org> > wrote: > > >> At calling time, the subclass' method will be found, and used, and the >>> search stops

Re: [Python-ideas] Decorator to avoid a mistake

2016-11-28 Thread Guido van Rossum
On Mon, Nov 28, 2016 at 1:44 PM, Chris Barker <chris.bar...@noaa.gov> wrote: > > On Mon, Nov 28, 2016 at 1:37 PM, Guido van Rossum <gu...@python.org> > wrote: > > >> They can, and they @override can be bypassed. I don't see that as a >> condemnation

Re: [Python-ideas] Null coalescing operator

2016-10-31 Thread Guido van Rossum
Obviously the AST needs to be changed. How? I dunno. Sounds like you have some ideas. :-) On Mon, Oct 31, 2016 at 2:44 PM, Random832 <random...@fastmail.com> wrote: > On Mon, Oct 31, 2016, at 13:16, Guido van Rossum wrote: > > For "everything to the right" it would seem

Re: [Python-ideas] Null coalescing operator

2016-11-01 Thread Guido van Rossum
____________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Null coalescing operator

2016-10-31 Thread Guido van Rossum
th > the phrase "other popular languages" - if we're stealing the behaviour > as is from C#, let's say so, and if not, can you include examples from > more than one language?) Assuming that's the case, then the fact that > it's not causing c

Re: [Python-ideas] Null coalescing operator

2016-11-01 Thread Guido van Rossum
Geez. --Guido (mobile) On Nov 1, 2016 8:10 PM, "Chris Angelico" wrote: > On Wed, Nov 2, 2016 at 11:09 AM, Steven D'Aprano > wrote: > > I don't know when I would ever want to actually do this in practice, but > > allowing the ?. operator to magically

Re: [Python-ideas] Adding full() to collections.deque

2016-10-11 Thread Guido van Rossum
list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] [Python-Dev] Optimizing list.sort() by checking type in advance

2016-10-10 Thread Guido van Rossum
(IIRC timeit tries to compensate for the cost of the loop itself by measuring an empty loop, but that's got its own set of problems.) Anyway, you should ignore me and listen to Tim, so I'll shut up now. -- --Guido van Rossum (python.org/~guido) ___ Python-ideas m

Re: [Python-ideas] Null coalescing operator

2016-10-14 Thread Guido van Rossum
written with the proposed syntax. (It doesn't identify blocks > that would not be affected, so this doesn't completely answer your > question.) > > https://github.com/mehaase/pep-0505/blob/master/find-pep505.py > > The PEP also includes the results of running this script over the standa

Re: [Python-ideas] How to respond to trolling

2017-01-10 Thread Guido van Rossum
should have known better. -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] How to respond to trolling (Guido van Rossum)

2017-01-12 Thread Guido van Rossum
led (and I know this can seem small, > but as one of the people being judged regularly I can attest that the > constant ridicule contributes to burnout). > > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Things that won't change (proposed PEP)

2017-01-12 Thread Guido van Rossum
etter > than, the cited suggestions that have already been rejected". > > Probably a lot of work to gather all the references though. But it could > start out with one or two and grow from there. Add to it as and when people > bring up the same old stuff next time. > > E. >

Re: [Python-ideas] Add optional defaults to namedtuple

2016-11-30 Thread Guido van Rossum
ee(NamedTuple): name: str id: int We should make it so that the initial value in the class is used as the default value, too. (Sorry, this syntax still has no room for a docstring per attribute.) -- --Guido van Rossum (python.org/~guido <http://python.org/%7Eguido>)

Re: [Python-ideas] Adding an 'errors' argument to print

2017-03-24 Thread Guido van Rossum
ike that. > You can already set the PYTHONIOENCODING environment variable to > ":replace" to use "replace" on sys.stdout (and sys.stderr). > Great tip, I've needed this! -- --Guido van Rossum (python.org/~guido) ___ Pytho

Re: [Python-ideas] Discourage operator.__dunder__ functions

2017-04-13 Thread Guido van Rossum
+1 On Apr 13, 2017 11:26 AM, "Steven D'Aprano" wrote: > Notice that I said *discourage* rather than *deprecate*. > > Quoting the documentation: > > The operator module exports a set of efficient functions > corresponding to the intrinsic operators of Python. For >

Re: [Python-ideas] Thread-safe generators

2017-04-15 Thread Guido van Rossum
My 2 cent's worth, don't even think about it. On Apr 15, 2017 3:27 AM, "Serhiy Storchaka" wrote: > On 15.04.17 11:55, Stephen J. Turnbull wrote: > >> Serhiy Storchaka writes: >> >> > The first thread just sets the running flag (as in current code). Due >> to >> > GIL this

Re: [Python-ideas] Thread-safe generators

2017-04-16 Thread Guido van Rossum
I think the two shouldn't be mixed. On Apr 16, 2017 7:58 AM, "Victor Stinner" wrote: > Thread safety is very complex and has an impact on performance. I dislike > the idea of providing such property to generators which can have a complex > next method. > > IMHO it's

Re: [Python-ideas] Positional-only parameters

2017-03-01 Thread Guido van Rossum
; [...] is not Python syntax too. And it is orthogonal to positional-only > parameters. [...] doesn't mean that parameters are positional-only. They > can be passed by keyword, but just don't have default value. On other side, > mandatory parameters can be positional-only. FWIW in types

Re: [Python-ideas] Binary arithmetic does not always call subclasses first

2017-04-24 Thread Guido van Rossum
If this is portant I should probably ponder it. On Apr 24, 2017 4:47 PM, "Stephan Hoyer" wrote: > +Georg Brandl, in case he remembers where "Move the 3k reST doc tree in > place." moved things from: > https://github.com/python/cpython/commit/116aa62bf54a39697e25f21d6cf679 >

Re: [Python-ideas] New PEP 550: Execution Context

2017-08-11 Thread Guido van Rossum
I may have missed this (I've just skimmed the doc), but what's the rationale for making the EC an *immutable* mapping? It's impressive that you managed to create a faster immutable dict, but why does the use case need one? -- --Guido van Rossum (python.org/~guido

Re: [Python-ideas] New PEP 550: Execution Context

2017-08-12 Thread Guido van Rossum
Thanks for the explanation. Can you make sure this is explained in the PEP? On Aug 11, 2017 10:43 PM, "Yury Selivanov" <yselivanov...@gmail.com> wrote: > > On Fri, Aug 11, 2017 at 10:17 PM, Guido van Rossum <gu...@python.org> > wrote: > > > I may hav

Re: [Python-ideas] New PEP 550: Execution Context

2017-08-14 Thread Guido van Rossum
on motivation and not enough on crisply explaining how the proposed feature works (what state is stored where how it's accessed, and how it's manipulated behind the scenes). -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas

Re: [Python-ideas] a new namedtuple

2017-07-17 Thread Guido van Rossum
rred people here for discussion of ideas like this: >>> a = (x=1, y=0) -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] a new namedtuple

2017-07-18 Thread Guido van Rossum
aclass -- then you have a metaclass conflict. If the namedtuple had no metaclass this would not be a conflict. (This is one reason to love class decorators.) -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-idea

Re: [Python-ideas] a new namedtuple

2017-07-18 Thread Guido van Rossum
amedTuple (and indeed it's done with a metaclass). -- --Guido van Rossum (python.org/~guido <http://python.org/%7Eguido>) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

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

2017-07-21 Thread Guido van Rossum
chaos. -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Binary arithmetic does not always call subclasses first

2017-04-25 Thread Guido van Rossum
!) --Guido On Mon, Apr 24, 2017 at 4:54 PM, Guido van Rossum <gvanros...@gmail.com> wrote: > If this is portant I should probably ponder it. > > On Apr 24, 2017 4:47 PM, "Stephan Hoyer" <sho...@gmail.com> wrote: > >> +Georg Brandl, in case he remembers wher

Re: [Python-ideas] Generator syntax hooks?

2017-08-08 Thread Guido van Rossum
omplexity at the language design level. > I haven't come around to this yet. It looks like it will make explaining comprehensions more complex, since the translation of "while X" into "if not X: break" feels less direct than the translations of "for x in xs" or "if pr

Re: [Python-ideas] More Metadata for Variable Annotations

2017-08-18 Thread Guido van Rossum
provide abilities to generate schemas and other >> definitions (e.g. OpenAPI) automatically and without duplication. >> >> The proposed solutions are definitely not perfect and not the main point >> of this email. The target is to describe the idea and motivation and start &g

Re: [Python-ideas] PEP 550 v2

2017-08-18 Thread Guido van Rossum
; +1 confused :/ > > -- > ~Ethan~ > > > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~g

Re: [Python-ideas] singledispatch for instance methods

2017-05-14 Thread Guido van Rossum
PS: I didn't see a message from Lisa on the mailing list -- maybe she replied to you only? On Sun, May 14, 2017 at 9:25 AM, Guido van Rossum <gu...@python.org> wrote: > How exactly do you think the process of adopting something into the stdlib > works? Just posting "bump" m

Re: [Python-ideas] singledispatch for instance methods

2017-05-14 Thread Guido van Rossum
g list >>>>> Python-ideas@python.org >>>>> https://mail.python.org/mailman/listinfo/python-ideas >>>>> Code of Conduct: http://python.org/psf/codeofconduct/ >>>> >>>> >>> ___ >>> Python-ideas mailing list &

Re: [Python-ideas] singledispatch for instance methods

2017-05-14 Thread Guido van Rossum
e of the entire procedure and if small > things need a PEP or not. I actually received the tip to bump from > core-mentorship, so now I'm rather confused. > > Anyway, shall I add it to the bug tracker as an enhancement? > > On Sun, May 14, 2017, 7:26 PM Guido van Rossum <gu...@p

Re: [Python-ideas] singledispatch for instance methods

2017-05-14 Thread Guido van Rossum
list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)

2017-05-14 Thread Guido van Rossum
ial endorsement, the odds are exactly zero. Of course if this pattern is useful for you in the context of something you are developing you are free to use it, presuming it doesn't require language or stdlib changes. -- --Guido van Rossum (python.org/~guido) ___

Re: [Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)

2017-05-15 Thread Guido van Rossum
I expect that we will need someone with a really good sensibility for Pythonic language/API design to lead the PEP writing. On Mon, May 15, 2017 at 9:03 AM, אלעזר <elaz...@gmail.com> wrote: > On Mon, May 15, 2017 at 6:30 PM Guido van Rossum <gu...@python.org> wrote: > >

Re: [Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)

2017-05-15 Thread Guido van Rossum
On Mon, May 15, 2017 at 9:50 AM, Brett Cannon <br...@python.org> wrote: > > On Mon, 15 May 2017 at 08:30 Guido van Rossum <gu...@python.org> wrote: > >> This should be worked into a PEP, instead of living on as a bunch of >> python-ideas posts and blogs. >

Re: [Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)

2017-05-16 Thread Guido van Rossum
I could also try this myself in my spare time at PyCon (surprisingly, I have some!). It sounds kind of interesting. However I've never used the 'attrs' package... On Tue, May 16, 2017 at 7:52 AM, Ivan Levkivskyi <levkivs...@gmail.com> wrote: > On 15 May 2017 at 18:22, Guido van R

Re: [Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)

2017-05-15 Thread Guido van Rossum
deas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] be upfront if you aren't willing to implement your own idea

2017-06-23 Thread Guido van Rossum
. And > I would find it unfortunate if discussion of the former were prematurely > restricted by worries about the latter. > > -- > Brendan Barnwell > "Do not follow where the path may lead. Go, instead, where there is no > path, and leave a trail." >--author unknown > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] socket module: plain stuples vs named tuples

2017-06-19 Thread Guido van Rossum
"sequence" type requires something like 50 lines of code, > maybe more, I don't know exactly. > > Victor > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.

Re: [Python-ideas] tweaking the file system path protocol

2017-05-23 Thread Guido van Rossum
int. > > ___________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > > -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Exposing CPython's subinterpreter C-API in the stdlib.

2017-05-24 Thread Guido van Rossum
gt; interpreters.Interpreter.is_running() > interpreters.Interpreter.destroy() > interpreters.Interpreter.run(code) > ___________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas >

Re: [Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)

2017-05-19 Thread Guido van Rossum
y: > > self.myattrib = callable (myattrib) > > Stephan > > Op 19 mei 2017 20:25 schreef "Guido van Rossum" <gu...@python.org>: > > For people who don't want to click on links: >> >> 1. Allow hash and equality to be based on object

Re: [Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)

2017-05-16 Thread Guido van Rossum
s a lightning talk at the language summit to > see > > who in the room has the appropriate background knowledge? And obviously > > someone can talk to Hynek to see if he wants to provide input based on > > community feedback for attrs and lessons learned. > > > &g

Re: [Python-ideas] π = math.pi

2017-06-02 Thread Guido van Rossum
allow identifiers like ∫ or √. > This will make many expressions more similar to usual TeX, > plus it will be useful for projects like SymPy. > > -- > Ivan > > > > ___ > Python-ideas mailing list > Python-ideas@pyt

Re: [Python-ideas] π = math.pi

2017-06-04 Thread Guido van Rossum
> > >> On Fri, 2 Jun 2017 at 15:56 Guido van Rossum <gu...@python.org> wrote: > >> > >>> I would love to show how easy it is to write > >>> > >>> from math import pi as π, gamma as Γ > > > > [...] > > > >>>

Re: [Python-ideas] π = math.pi

2017-06-02 Thread Guido van Rossum
4:29:16PM -0700, Guido van Rossum wrote: > > > Are those characters not considered Unicode letters? Maybe we could add > > their category to the allowed set? > > They're not letters: > > py> {unicodedata.category(c) for c in '∑√∫∞'} > {'Sm'} > > > T

Re: [Python-ideas] π = math.pi

2017-06-02 Thread Guido van Rossum
Are those characters not considered Unicode letters? Maybe we could add their category to the allowed set? On Jun 2, 2017 4:02 PM, "Ivan Levkivskyi" <levkivs...@gmail.com> wrote: > On 3 June 2017 at 00:55, Guido van Rossum <gu...@python.org> wrote: > >>

Re: [Python-ideas] Security: remove "." from sys.path?

2017-06-04 Thread Guido van Rossum
-- > Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] π = math.pi

2017-06-04 Thread Guido van Rossum
at 8:33 PM, Nick Coghlan <ncogh...@gmail.com> wrote: > On 5 June 2017 at 07:00, Guido van Rossum <gvanros...@gmail.com> wrote: > > AFAK it was in whatever PEP introduced Unicode identifiers. > > Ah, indeed it is: https://www.python.org/dev/peps/pep-3131/#policy- > s

Re: [Python-ideas] Proposed PEP 484 addition: describe a way of annotating decorated declarations

2017-05-01 Thread Guido van Rossum
On Mon, May 1, 2017 at 12:28 AM, Nick Coghlan <ncogh...@gmail.com> wrote: > On 1 May 2017 at 03:07, Guido van Rossum <gu...@python.org> wrote: > > There's a PR to the peps proposal here: > > https://github.com/python/peps/pull/242 > > > > The ful

Re: [Python-ideas] PEP 563 and expensive backwards compatibility

2017-09-13 Thread Guido van Rossum
on't care about that everything's easy.) -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

[Python-ideas] A reminder for PEP owners

2017-09-13 Thread Guido van Rossum
no way I am going to read all the discussions. -- --Guido van Rossum (python.org/~guido <http://python.org/%7Eguido>) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct

Re: [Python-ideas] Hexadecimal floating literals

2017-09-20 Thread Guido van Rossum
mp; output test vectors are > going to use binary or hex representations, not decimal). > > Cheers, > Nick. > > -- > Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Use __all__ for dir(module) (Was: PEP 562)

2017-09-17 Thread Guido van Rossum
dir(). Apart from that, > nothing broke. > > If a module does not have __all__ defined, then nothing changes for that > module. > > Cody > ___ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/pyt

Re: [Python-ideas] sys.py

2017-09-13 Thread Guido van Rossum
ren...@gmail.com> wrote: > On Tue, Sep 12, 2017 at 9:30 PM, Guido van Rossum <gu...@python.org> > wrote: > > I find this a disturbing trend. > > Which trend? Moving away from "consenting adults"? In the case of > sys.modules, the problem is that as

Re: [Python-ideas] Hexadecimal floating literals

2017-09-21 Thread Guido van Rossum
this base-2/16 > representation saves them all their approximation issues and their need > still to use isclose() or friends. > Show them 1/49*49, and explain why for i < 49, (1/i)*i equals 1 (lucky rounding). -- --Guido van Rossum (python.org/~guido) _

Re: [Python-ideas] Hexadecimal floating literals

2017-09-21 Thread Guido van Rossum
ilt into the language -- just because something is a function doesn't mean it's an expert operation. -- --Guido van Rossum (python.org/~guido) ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Hexadecimal floating literals

2017-09-22 Thread Guido van Rossum
> False > OMG Regardless of whether we introduce this feature, .hex() is the way to show what's going on here: >>> 0.1.hex() '0x1.ap-4' >>> 0.2.hex() '0x1.ap-3' >>> 0.3.hex() '0x1.3p-2' >>> (0.1+0.2).hex() '0x1.333

Re: [Python-ideas] PEP draft: context variables

2017-10-09 Thread Guido van Rossum
and get operations instead of "assignment contexts" like >> PEP 555 (this one) does. ​​ >> > > We didn't forget it, we just don't think it's very useful. > I'm not sure I agree on the usefulness. Certainly a lot of the complexity of PEP 550 exists just to cater to

Re: [Python-ideas] PEP draft: context variables

2017-10-10 Thread Guido van Rossum
On Tue, Oct 10, 2017 at 5:34 AM, Nick Coghlan <ncogh...@gmail.com> wrote: > On 10 October 2017 at 01:24, Guido van Rossum <gu...@python.org> wrote: > >> On Sun, Oct 8, 2017 at 11:46 PM, Nick Coghlan <ncogh...@gmail.com> wrote: >> >>> On 8 October 2017

Re: [Python-ideas] PEP draft: context variables

2017-10-14 Thread Guido van Rossum
the current context should be fast.) I also don't want to obsess over API abstraction. Finally I don't want the design to be closely tied to `with`. Maybe I need to write my own PEP? -- --Guido van Rossum (python.org/~guido) ___ Python-ideas maili

  1   2   3   4   5   6   7   8   9   >