Please send all discussions about these PEPs to the typing-sig mailing
list, so we have the archives all in one place. Read the full message here:
https://mail.python.org/archives/list/typing-...@python.org/thread/GCI2TF43SESP2XVSETWOW33SRRWQTHM4/
--
--Guido van Rossum (python.org/~guido
good reason to tie deletion (or deprecation) of
the `parser` module to whatever we do there.
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him/his **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
___
ze.py is closely tied to the names and numbers of the tokens, and the
latter information is currently generated based on the contents of the
Grammar file. This may get in the way of using it to tokenize old Python
versions.
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him/his **(w
On Mon, May 20, 2019 at 11:29 AM Steven D'Aprano
wrote:
> On Mon, May 20, 2019 at 08:55:59AM -0700, Guido van Rossum wrote:
>
> > I am interested in switching CPython's parsing strategy to something else
> > (what exactly remains to be seen)
>
> Are you r
o make them
> implementation independent.
>
> Thanks for comments,
> Pavel
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/ma
decompression to argparse if fileinput
> is deprecated.
>
> Regards,
>
> --
> Inada Naoki
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
>
;
> for the fjords. Discussions like this need a bit of levity to keep us
> all grounded, IMO.
>
> Paul
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Un
e documentation, if we want to endorse them. But just as
> we're not removing `array` in favor of `numpy`, we shouldn't remove
> colorsys either. Colorsys is not dead, it's just small.
>
> I assume one of the reasons colorspacio
OK, sounds like nntplib can stay — this time.
On Tue, May 21, 2019 at 08:33 Antoine Pitrou wrote:
>
> As I said, if the main annoyance with nntplib is the sporadic test
> failures, then the relevant tests can be disabled on CI.
>
> NNTP itself is still used, even if less and less.
>
> Regards
>
ython.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/guido%40python.org
>
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him/his **(why is my pronoun here?)*
<http://feministing.com/2015/02/03
odule still
has fans. Threatening to open a CVE is more likely to reduce support for
the PEP than it is to convince anyone.
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him/his **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-
)
>
> -eric
>
>
> [1] https://www.python.org/dev/peps/pep-0544/#implementation-details
> _______
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org
oine.
>> ___
>> Python-Dev mailing list
>> Python-Dev@python.org
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> https://mail.python.org/mailman/options/python-dev/brett%40python.org
>&g
/cpython/pull/9461 should fix most of the
> annoyances with test_nntplib. It uses a local server instead of an
> external one.
>
> --Berker
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman
e_LocalsToFast``,
> were
> removed in the migration to Python 3: ``exec`` is no longer a statement
> (and
> hence can no longer affect function local namespaces), and the compiler
> now
> disallows the use of ``from module import *`` operations at function
> scope
> * however,
functions), I don't
think that what you describe here is too worrisome a scenario.
On Sat, May 25, 2019 at 2:09 PM Nathaniel Smith wrote:
> On Sat, May 25, 2019, 07:38 Guido van Rossum wrote:
>
>> This looks great.
>>
>> I only have two nits with the text.
>>
he new version,
> otherwise you are just forcing the programmer to be making the copies
> explicitly.
>
> --
> Richard Damon
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/
ng it.
>
>
> # Conclusion so far
>
> [PEP-minus-tracing] seems to strictly dominate [PEP]. It's equal or
> better on all criteria, and actually *more* compatible with all the
> legacy code I looked at, even though it's technically less consistent
> with what CP
May 27, 2019 at 9:16 AM Guido van Rossum wrote:
> >
> > I re-ran your examples and found that some of them fail.
> >
> > On Mon, May 27, 2019 at 8:17 AM Nathaniel Smith wrote:
> [...]
> >> The interaction between f_locals and and locals() is also subtle:
> &g
>
> > Consistency across contexts: it's surprising if locals() has acts
> > differently in module/class scope versus function scope. This argues
> > for [proxy].
>
> True as far as it goes, but its also true that for the longest time, in
> mo
he code of conduct.) I'd be happy to know how I can improve.
>
>
> And now, I'm off to get the implementation reviewed!
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/pyt
? (There used
to be some relevant builtins that took dicts but not general
MutableMappings -- but that has been fixed long ago.)
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him/his **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-usi
So why is it “hellish” for JITs if locals() returns a proxy, while
frame.f_locals being a proxy is okay?
On Tue, May 28, 2019 at 9:12 PM Nick Coghlan wrote:
> (I'll likely write a more detailed reply once I'm back on an actual
> computer, but wanted to send an initial response while folks in the
Indeed.
On Tue, May 28, 2019 at 11:07 PM Greg Ewing
wrote:
> Nick Coghlan wrote:
> > Having a single locals() call de-optimize an entire function would be
> > far from ideal.
>
> I don't see what would be so bad about that. The vast majority
> of functions have no need for locals().
>
> --
> Gre
-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/guido%40python.org
>
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him/his **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
___
ight. And static analysis should also be able to detect most uses of
locals() in a frame. I believe I've heard of some alternate Python
implementations that detect usage of some functions to disable some
optimizations (IIRC IronPython did this to sys._getframe()).
--
--Guido van Rossum (python
w should we
> do platform-specific conditions".
>
> Cheers,
> Steve
> _______
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/
There's a user on GitHub ('experimentalles') who has created random PRs on
several projects (e.g. https://github.com/python/peps/pull/1116). Can we
ban them? The PRs look the work of a vandal or a bot, not of a clueless
human.
--
--Guido van Rossum (python.org/~guido)
*Prono
ent
without a separate pass to make sure you don't try to assign to a call, and
it would allow a much more elegant approach to keyword arguments and the
walrus operator.)
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him/his **(why is my pronoun here?)*
<http://feministing.com/2015/0
n.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/JSAQAZD2GREBH72VCHO5ZZJQSYQHLTOV/
>
--
--Guido van Rossum (python.o
what this side should be.
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https
"easy" aimed at somewhat different targets?
>
> Skip
>
>
> Skip
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/
this was already discussed
> in the initial thread, I don't have access to core-mentorship.
>
I don't know yet. You can watch updates to the devguide to find out.
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him/his **(why is my pronoun here?)*
<http://feministing.co
On Sat, Jul 27, 2019 at 8:46 PM Steve Dower wrote:
> On 26Jul.2019 1909, Guido van Rossum wrote:
> > See the thread 'The trouble with "Easy" issues' in
> > core-mentors...@python.org <mailto:core-mentors...@python.org>.
> > Essentially those "
On Sun, Jul 28, 2019 at 1:25 PM Antoine Pitrou wrote:
> On Fri, 26 Jul 2019 19:09:35 -0700
> Guido van Rossum wrote:
> > See the thread 'The trouble with "Easy" issues' in
> > core-mentors...@python.org.
> > Essentially those "easy" issue
hon-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/YGZELVWRGXZ5BTD4ZM
ort lru_cache
> >>> cached_namedtuple = lru_cache(None)(namedtuple)
> >>> n1 = cached_namedtuple('f', ('a', 'b', 'c')) # A tuple rather than a
> list of field names, as lists aren't hashable
> >>> n2 = cached_namedtuple(&
l?
>
> Things get also a bit more complicated since struct sequence
> objects can contain unnamed fields.
>
> Any advice would be appreciated, I am no typing expert (yet :-)
>
> cheers -- Chris
>
>
> On 30.07.19 17:10, Guido van Rossum wrote:
> > I think I have to a
email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/VEC7VWY5TJJGBXWFQUX3XO43SQAZ7FMR/
> Code of Conduct: http://python.org/psf/code
x27;?' as a general assignment target. PEP 635 has some language
against that idea.
- Alternative indentation schemes. We decided to stick with the original
proposal; see PEP 635.
- Marking all capture variables with a sigil. We all agreed this was a bad
idea; see PEP 635.
--
--Guido van Ro
very tedious), so it's done during a later stage. We have
many of these (e.g. 'return' outside function, also not encoded in the
grammar).
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://
propose this as a follow-up for 3.11.
But aren't Go channels more like asyncio Queues? I guess we'd need way more
in terms of a worked-out example (using asyncio code, not Go code).
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://femini
e in patterns. I
could imagine seeing
```
match DEBUG_NETWORK, DEBUG_LOGIC:
case False, False: pass
case False, True: print("We're debugging logic only")
case True, False: print("Debugging network only")
case True, True: print("Debugging network and loggi
On Sat, Oct 31, 2020 at 21:48 Dan Stromberg wrote:
>
> On Sat, Oct 31, 2020 at 9:37 PM Guido van Rossum wrote:
>
>>
>> I think this over-stresses the notion that users might want to override
>> the comparison operator to be used. We only have two operators that ma
of two equal values" and we want to
be able to call that out as an error. Hence the need for recognizing the
wildcard in the parser, since `case x, _, _` *is* important. Hence the need
to standardize it (i.e., not leave it to be *just* a convention). Using _
seems the most commonly used convention
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
rg
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/E7Y5MB4JJEB3VW2J24HA7JQZH6JRAOMO/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
--Guido van Rossum (pyth
..@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/AGYLMJQOWV6SQVBVT7VGEII77V4ALVT6/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
--Guido van Rossum
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/B54VI2DN2AYUXJG4SWSW2BMU5OOCIGSX/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<htt
mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/2XKNMFRSK2YUDFDCQFX7XLIHUFQOLTAH/
>
Do you want to join the docs WG? IIUC it’s open to new members. (Carol?)
On Mon, Nov 9, 2020 at 08:34 Chris Angelico wrote:
> On Tue, Nov 10, 2020 at 3:19 AM Simon Cross
> wrote:
> >
> > I really enjoyed learning from this "user manual with a strong
> > narrative component" so I would personall
gt;
> Raymond
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived
at
> https://mail.python.org/archives/list/python-dev@python.org/message/RQPUV7PABLBNYJ7FI7QYCS6TKJ4H2Q2A/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02
nd an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/LHGZNTRKU2Z2OD3W7DPFEDS274OBFE7F/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
will likely have a significant overlap with the current SC). I will wait
for that.
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-t
that they are pretty similar, since it will smooth learning (things
don't have to be equal for learning by similarity to happen). This kind of
syntactic "rhyme" is pretty important to me. Marking captures with sigils
would destroy this.
--
--Guido van Rossum (python.org/~gui
But Point(x as a) already has a meaning in PEP 634; it’s a positional
argument captured in x *and* in a. (Previously spelled as Point(a := x).
The phrase ‘as a’ can be added after any pattern to *also* capture it in
‘a’. More typically used as e.g.‘Pattern(x, y) as p’, which captures the
first two
ived at
> https://mail.python.org/archives/list/python-dev@python.org/message/BTPODVYLPKY5IHWFKYQJICONTNTRNDB2/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/0
v.python.org/
> > Message archived at
> >
> https://mail.python.org/archives/list/python-dev@python.org/message/KGYRLITEPB22ZZO4N7DD4A7QP7FQS6JO/
> >
> > Code of Conduct: http://python.org/psf/codeofconduct/
> _
t; > ...
> > >>> f(3)
> > Traceback (most recent call last):
> >File "", line 1, in
> >File "", line 6, in f
> > UnboundLocalError: local variable 'x' referenced before assignment
> &
here, too, it is a normal variable name except in
patterns.
PS. Why do you think that this is "late in Python's history?" In 100 years
people will chuckle about that. :-)
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
&l
org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/YMLP5QDXRCO2QJG2GXJFIG3F4F56VLPL/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
--Guido van Rossum (python.org/
But none of those limitations are there under our proposal. You can write
this if you want:
match = 1
match match:
case case: print(case, match)
And you can use _(“...”) anywhere in the case block and even in the guard.
Just not as a pattern, but you can’t use f(1) there either...
On Fri,
that they
get bonus points for being different.
This is not a case of "feature envy" (often seen when people propose a
feature that they like in another language without understanding Python).
Pattern matching fills a real need and the design is about as Pythonic as
it gets.
--
--
that the meaning of a bare
name should be a capture variable.
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_
in your writing style? We all will need to get along for a long
time after this particular topic is put to rest, but each time I see one of
your posts like this I find it harder to respond rationally rather than
emotionally. (It is no accident that it took me 5 days to respond here.)
--
--Guido va
s the only bug in Steven's example that I found, but I didn't bother to
call it out.)
(c) What Ethan said -- after fixing the syntax this does show that the
keywords in class patterns correspond to attributes, not to constructor
arguments (unless those are the same, as they often ar
n-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/7IUE5AJZNYZHEGL4VYOFUKUYUCU7APMI/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
--Guid
It's funny, that link is on every page, but nobody ever sees it. :-)
On Thu, Dec 3, 2020 at 3:35 PM Jonathan Goble wrote:
> On Thu, Dec 3, 2020 at 6:16 PM Guido van Rossum wrote:
>
>> If you want to get the attention of the people who maintain the website,
>> please lo
I hope more of the regulars here jump on this bandwagon. It will be a great
day when Paul posts one of his offensive posts and there is just deafening
silence.
Paul was in my (very short) kill file for years but I decided to give him
another chance. And he blew it.
There is a reason why he was ba
-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/6NEXFZIEFGKACLP6BUTJVWJ4ARXU
y suggestions? Is constructing a
> (dynamically-type-annotated) class in a function like this an anti-pattern?
>
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.p
so the bar to change this is very high.
(It's not the default behavior until 3.10 though, so theoretically there
might be a little bit more wiggle room for that. So far you haven't shown
sufficient evidence to consider that though.)
--
--Guido van Rossum (python.org/~guido)
*Pronouns: h
gt; On Tue, 2020-12-08 at 21:49 -0800, Guido van Rossum wrote:
>
> On Tue, Dec 8, 2020 at 8:58 PM Paul Bryan wrote:
>
> My use case is to for type annotations to resolve type encoders, decoders
> and validators at runtime.
>
>
> What is the reason you can't insist that t
python.org/mailman3/lists/python-dev.python.org/
>>> Message archived at
>>> https://mail.python.org/archives/list/python-dev@python.org/message/5AWFX2POTPNVW72VUPCPTJIOA6AOSVWY/
>>> Code of Conduct: http://python.org/psf/codeofconduct/
>>>
>> _
reliable and way outlives the OS
updates. Even if an OS updates is still available, the newer OS often needs
more memory, which can be a problem (most Apple hardware is hard to add
memory to). What are people supposed to do? Just throw away their expensive
computer?
--
--Guido van Rossum (pytho
g/message/JMZR5SNOE2TMVH4AQYRUSO6JXCZET5MD/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
___
lias` type.)
Hope this helps,
--Guido
On Thu, Dec 10, 2020 at 7:17 PM Paul Bryan wrote:
> Per PEP 563:
>
> Most importantly, Guido van Rossum explicitly stated interest in gradually
> restricting the use of annotations to static typing (with an optional
> runtime component).
>
&
gt; Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/6Z43SU2RPIHTRABY
it's an endless slog for
the developers involved, and in open source it's hard to assign resources
for such a project.
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-u
On Sun, Dec 27, 2020 at 3:19 AM Ronald Oussoren
wrote:
>
>
> On 26 Dec 2020, at 18:43, Guido van Rossum wrote:
>
> On Sat, Dec 26, 2020 at 3:54 AM Phil Thompson via Python-Dev <
> python-dev@python.org> wrote:
>
>> It's worth comparing the situation with
ons I can think of:
>>>
>>> - pass a keyword argument to type.__new__ that suppresses the call to
>>> __init_subclass__; and
>>> - provide a way to invoke new class' parent's __init_subclass__ before
>>> returning it
>>>
>>> or
>>&
On Mon, Dec 28, 2020 at 10:24 PM Ethan Furman wrote:
> On 12/28/20 9:31 PM, Guido van Rossum wrote:
>
> > Let me see if I can unpack this.
> >
> > I observe that `type.__new__() ` is really the C function `type_new()`
> in typeobject.c, and hence I will refer to it
--Guido
On Tue, Dec 29, 2020 at 10:44 AM Ethan Furman wrote:
> On 12/29/20 8:59 AM, Guido van Rossum wrote:
> > On Mon, Dec 28, 2020 at 10:24 PM Ethan Furman wrote:
>
> >> The `__init_subclass__` and `__set_name__` protocols are intended to be
> run before a new type is
__
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python
rg
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/AM7AVQH6L4AQVTB5UFOBYXICDPXYZBKQ/
> Code of Conduct: http://p
ituations where we're all still considered to be
consenting adults -- surely abstract classes and methods are meant as a way
to help users do the right thing, not as an absolute guarantee.
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://fe
; I'll start bisecting to try to track this down. It looks like "if a.b:
>> pass" is getting partially optimized out; the disassembly shows a
>> being loaded, its attribute b being looked up, and then it just jumps
>> to the else - there's no POP_JUMP_IF_FALSE as
__
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/messa
Ah never mind. Seems to be a real bug -- thanks for reporting!
On Mon, Jan 11, 2021 at 2:57 PM Mats Wichmann wrote:
> On 1/11/21 1:00 PM, Guido van Rossum wrote:
> > All that said (I agree it's surprising that 3.10 seems backwards
> > incompatible here) I would
org/message/DXQJ2V32YIV5KZQNFSPFVGKKVHIZDFPD/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
___
On Mon, Jan 11, 2021 at 5:21 PM Larry Hastings wrote:
>
> On 1/11/21 4:39 PM, Guido van Rossum wrote:
>
> The easiest thing would be just to create an empty `__annotations__` for
> classes that have no annotated variables, and to hell with the cost.
>
> I assume you'd
Oh, but the behavior of annotations in e.g. mypy is the same. They are
cumulative.
On Mon, Jan 11, 2021 at 17:42 Larry Hastings wrote:
>
> On 1/11/21 5:28 PM, Guido van Rossum wrote:
>
> On Mon, Jan 11, 2021 at 5:21 PM Larry Hastings wrote:
>
>> Slots intelligently support
eturn {"a": Outer.Inner, "b": Outer, "return": None}
```
(Note that for *function* locals you don't have to do anything, they just
work, because of closures -- you may not understand them, but they are
important here. :-)
--
--Guido van Rossum (python.org/~guido)
*Pro
ype_hints() for which someone should file a
bug on bpo, please!
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
___
Python-De
_annotations__` will just contain the string literal, so
get_type_hints() would be needed to evaluate these.
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-
about what values you put in as
> annotations. You can put in strings, complex objects,
> expressions--whatever you put in, you get back out later.
>
> I'm happy to add some text to the PEP if this needs clarifying; I just
> thought it was obvious.
>
>
> Cheers,
>
>
&g
Does that mean that the generated function would contain the entire
expression `(int if random.random > 0.5 else float)`? I guess that's what
it has to mean. But the PEP only uses such simple examples that it's easy
to miss this.
--
--Guido van Rossum (python.org/~guido)
*Pronou
gt;annotations.
>
> PEP 484 "explicitly does NOT prevent other uses of annotations". But if
> you force everyone to use typing.get_type_hints() to examine their
> annotations, then you have de facto prevented any use of annotations that
> isn't compatible with type
This has tripped up many people. Maybe we should just bite the bullet and
change this?
--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
1301 - 1400 of 6462 matches
Mail list logo