Guido van Rossum added the comment:
I beg to differ. The rule I use is: If it doesn't work without parentheses,
try adding them. That's simple rnough.
--
___
Python tracker
<https://bugs.python.o
Change by Guido van Rossum :
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
For performance reasons the implementation of generics changed completely in
3.7. I don't think we can restore the behavior you observed in 3.6.
--
___
Python tracker
<https://bugs.python.org/is
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue38242>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
3.9 only!
--
nosy: +gvanrossum
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.6, Python 3.7, Python 3.8
___
Python tracker
<https://bug
Guido van Rossum added the comment:
Even if this not desirable for the source code, it still makes sense to add the
types to the docs, at least when they are simple and compact. The proposed
notation from PEP 604 ('|' for unions) might help with compactness. Many docs
are unn
Guido van Rossum added the comment:
I'm sorry, but that's unacceptable.
On Mon, Sep 30, 2019 at 23:42 Vedran Čačić wrote:
>
> Vedran Čačić added the comment:
>
> > Many docs are ... vague about types.
>
> ... and I consider that a feature. At least if
Guido van Rossum added the comment:
@phr
To be clear, I agree that there's nothing wrong with adding signatures to docs.
We just need to find a way to do it. There will definitely be some cases where
it's better not to have a type rather than trying to spell out the actual type
i
Guido van Rossum added the comment:
Since this discussion went down in flames quickly, I'm closing it. Another
issue can be opened once someone has a concrete design of what this should look
like in the formatted docs, an example that does this for a few libraries, and
a prototype of a
Change by Guido van Rossum :
--
resolution: -> postponed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
Does it work if you pass a string of the form "host:port" as the host field?
I'd rather not change this antiquated interface too much, and I don't like
proliferating additional functions.
Guido van Rossum added the comment:
Then I find insufficient reason to change the API. Users who need this
frequently can make their own wrapper.
--
--Guido (mobile)
--
___
Python tracker
<https://bugs.python.org/issue38
Guido van Rossum added the comment:
@Amir maybe you can update the docs to add an example of how to do this (if
there isn't already one there).
--
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
It's a bug, but it's honestly such an odd corner case that I don't think this
should hold up the 3.8.0 release. Let's fix it in 3.9 and backport it to 3.8.1.
--
priority: release blocker -> normal
Guido van Rossum added the comment:
Thanks for working on a fix. But is it really important enough to violate the
desired "rc1 == release" invariant? It's up to the release manager.
--
___
Python tracker
<https://bugs.pyt
Guido van Rossum added the comment:
Why is this still open? That feature appears already implemented.
--
___
Python tracker
<https://bugs.python.org/issue34
Guido van Rossum added the comment:
See:
commit fd97d1f1af910a6222ea12aec42c456b64f9aee4
Author: David Cuthbert
Date: Fri Sep 21 18:31:15 2018
bpo-32117: Allow tuple unpacking in return and yield statements (gh-4509)
Iterable unpacking is now allowed without parentheses in
Guido van Rossum added the comment:
If it's specific to 2.7, why does the Version metadata say 3.7?
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
We never should have mentioned 4.0 as the target date to make this the
default (and only) behavior -- who knows whether there will ever even be a
Python 4.0? Even 3.10 might be on the early side (assuming we'll switch to
a year-long release cycle per PE
Guido van Rossum added the comment:
You can bring the deprecation schedule up on discourse or python-dev so more
folks can let us know whether they'd be okay with 3.9 or 3.10.
--
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
Well, as you point out, f(z=0, *(1, 2)) is legal, and the parser doesn't know
what the names of the keyword arguments are. SO this cannot be changed.
--
resolution: -> not a bug
stage: -> resolved
status: ope
Guido van Rossum added the comment:
Strong +1. I should have done this 20 years ago.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue37
Guido van Rossum added the comment:
@raymond Please stop spamming this issue with unrelated IDLE issues.
--
___
Python tracker
<https://bugs.python.org/issue37
New submission from Guido van Rossum :
This has always bothered me, and it shouldn't be necessary.
This session:
>>> #foo
...
>>>
should really have been
>>> #foo
>>>
It's confusing that the REPL prompt switches to "..." here, for
Guido van Rossum added the comment:
Yes, that's likely where the change should be made.
I think if the *first* token encountered is either NL or COMMENT the parse
should be abandoned by the tokenizer.
--
___
Python tracker
&
Guido van Rossum added the comment:
If we add a new flag to ignore errors it's difficult to write code that
works in 3.9 as well. And given the use case I have doubts that "Errors
should never pass silently" is really the right Zen line to focus on. I'd
rather go for &q
Guido van Rossum added the comment:
This does point out that the ast structure is a liability, and we won't be
able to easily change it, since mypy and IIRC many linters use the ast
module. So I think that maybe we need to think more carefully about what
the *proper* ast structure is, r
Guido van Rossum added the comment:
Serhiy, that’s brilliant! Let’s do it.
--
nosy: +Guido.van.Rossum
___
Python tracker
<https://bugs.python.org/issue30
Guido van Rossum added the comment:
New changeset bd2fa3c416ffe6107b500a2180fa1764645c0a61 by CAM Gerlach in branch
'master':
bpo-29982: Add "ignore_cleanup_errors" param to tempfile.TemporaryDirectory()
(GH-24793)
https://github.com/p
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue27929>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
I don't see what putting the limit back in this PR would give, but I do
question that we need more block nesting, and this PR causes a lot of code
churn (including a new API to create frames). It would be more convincing if
you could actually point
Guido van Rossum added the comment:
Yes, if we keep the top of the stack and the current frame in separate
variables.--
--Guido (mobile)
--
___
Python tracker
<https://bugs.python.org/issue42
Guido van Rossum added the comment:
Please open a separate issue for that.
--
___
Python tracker
<https://bugs.python.org/issue43463>
___
___
Python-bugs-list m
Guido van Rossum added the comment:
I can never remember what "Py_LIMITED_API" stands for. If it's not defined,
does that mean we have the *unlimited* API? Is that a superset or a subset of
the limited API?
Regarding 1a *and* 1b, I think it would help to list the s
Guido van Rossum added the comment:
Yeah, feel free to close this issue.
--
___
Python tracker
<https://bugs.python.org/issue42128>
___
___
Python-bugs-list m
Guido van Rossum added the comment:
Yeah, the runtime isinstance() checking is not required to give the right
answer. Also, I believe one of the rules is "if you inherit from a protocol you
are deemed to implement it". For methods, abstract methods can (but needn't) be
u
Guido van Rossum added the comment:
Yes, discussion on a close issue is still read, unless people explicitly
unsubscribe (which they rarely do unless the chatter is spam).
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
To be honest, I just don’t have time to deal,with this, so I’m hoping some
other core dev has an opinion. But I can’t help you find one either. Sorry,
but that’s the reality of open source development. --
--Guido (mobile
Change by Guido van Rossum :
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue43563>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
This looks like a sensible idea to me. The safeguards to ensure that customized
'super' still works seem reasonable to me. I have to admit that I sometimes
refrain from using super() where I should because of the expense, so this would
be welc
Guido van Rossum added the comment:
We should definitely document the column offset being 1-based, if it hasn't
been already. But be careful, there are some APIs that are 0-based and others
that are 1-based, for column offsets.
I was quite surprised at some point to find out that we
Guido van Rossum added the comment:
New changeset f0a6fde8827d5d4f7a1c741ab1a8b206b66ffd57 by Joshua Bronson in
branch 'master':
bpo-31861: Add aiter and anext to builtins (#23847)
https://github.com/python/cpython/commit/f0a6fde8827d5d4f7a1c741ab1a8b206b66ffd57
-
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
FWIW I have an idea that would allow code using e.g. &PyList_Type to continue
to work, and even ABI compatible (though only in the main interpreter).
// In some header file
PyAPI_FUNC(PyHeapTypeObject *) PyList_GetType();
#define PyList_
Guido van Rossum added the comment:
I think it's strange code -- the mixin wants to be a metaclass but also an ABC
(which is not a meta class). Unless there's a serious use case I'm inclinded to
reply "don't care".
--
Guido van Rossum added the comment:
Steve: let's talk about this in person today.
--
___
Python tracker
<https://bugs.python.org/issue43567>
___
___
Pytho
Guido van Rossum added the comment:
I've found build.bat --regen unreliable myself. I went over it with Steve and
one issue that came up is that it uses the python.exe that is built to run the
code generation scripts; OTOH on Linux/Mac these scripts are run using a
suitable pre-exi
Guido van Rossum added the comment:
Workaround:
For opcode.py changes, I can probably use the following strategy:
- build.bat
- Add new opcode to opcode.py
- build.bat --regen
- build.bat
- Make changes to compile.c and ceval.c to implement new opcode
- build.bat
For the parser perhaps you
Guido van Rossum added the comment:
Can you past the full output from your command?
Also, try making a dummy change (e.g. add a blank line) to each of the input
files -- this will trigger the rebuild.
PS. Please don't remove nosy folks unless they request so.
--
Guido van Rossum added the comment:
@Steve, Anthony: I am now in a state where I have *no* changes anywhere,
build.bat completes without errors, but build.bat --regen produces this error
(after first doing a regular build):
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise
Guido van Rossum added the comment:
FWIW, could this issue recently merged by Victor be related?
bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933)
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
So is there a bug in regen.vcxproj, or in
https://devguide.python.org/setup/#windows-compiling ? The latter says VS 2017.
@pjx206: please stop clearing out the nosy list. You've done that twice now. If
you do it again, I'll close
Change by Guido van Rossum :
--
nosy: +pablogsal, vstinner
___
Python tracker
<https://bugs.python.org/issue43567>
___
___
Python-bugs-list mailing list
Unsub
Guido van Rossum added the comment:
Anthony, can you help us out here? Is there a problem with regen.vcsproj,
either by depending on VS 2019 (which we don't officially support yet) or by
missing the changes in the names of some generated files?
--
nosy: +anthonyp
Guido van Rossum added the comment:
@Jiaxin Please test steve's PR.
--
___
Python tracker
<https://bugs.python.org/issue43567>
___
___
Python-bugs-list m
New submission from Guido van Rossum :
I'm lining up some PRs (inspired by some of Mark Shannon's ideas) that add new
opcodes which are straightforward combinations of existing opcodes. For
example, ADD_INT is equivalent to LOAD_CONST + BINARY_ADD, for certain small
(commo
Change by Guido van Rossum :
--
keywords: +patch
pull_requests: +23868
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25090
___
Python tracker
<https://bugs.python.org/issu
Guido van Rossum added the comment:
New changeset 652bfdee9495dca241d48278742fe035b7a82bdb by Irit Katriel in
branch 'master':
bpo-26053: Fix args echoed by pdb run command (#22033)
https://github.com/python/cpython/commit/652bfdee9495dca241d48278742fe035b7a82bdb
-
Guido van Rossum added the comment:
Do you need my help here?
--
___
Python tracker
<https://bugs.python.org/issue26053>
___
___
Python-bugs-list mailin
Guido van Rossum added the comment:
Jiaxin: "Resolution: works for me" is meant for the triager to indicate that
there is no bug, or at least that the repro given in the bug report doesn't
trigger the bug in the triager's environment. It does *not* mean that a patch
wor
Guido van Rossum added the comment:
New changeset ad442a674ca443feec43a88a2d3671784712e550 by Irit Katriel in
branch 'master':
bpo-24160: Fix breakpoints persistence across multiple pdb sessions (GH-21989)
https://github.com/python/cpython/commit/ad442a674ca443feec43a88a2d3671
Guido van Rossum added the comment:
Microbench results for ADD_INT:
https://github.com/python/cpython/pull/25090#issuecomment-810441738
I have a few others like this lined up -- Mark recommended submitting them one
at a time to make review easier.
My philosophy here (which I learned from
Guido van Rossum added the comment:
Statically, in the stdlib, about 1 in a 1000 opcodes is an ADD_INT candidate.
I'll have to do some more work to come up with a dynamic count.
--
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
New changeset 2b5913b4ee5852a28ca1509478f5582beb3aff7b by Ken Jin in branch
'master':
bpo-41370: Add note about ForwardRefs and PEP585 generic types in docs (#25183)
https://github.com/python/cpython/commit/2b5913b4ee5852a28ca1509478f558
Guido van Rossum added the comment:
Indeed, Bartosz. Do you think you can help by submitting a PR for the docs?
--
___
Python tracker
<https://bugs.python.org/issue41
Guido van Rossum added the comment:
To me it looks simpler though. The locals and cells are already stored in a
single array, f_localsplus (which also contains the evaluation stack). There
are various complications in ceval.c to translate cell indexes to indexes in
this array (ein
Guido van Rossum added the comment:
So dynamically, I see about 0.5% of all opcodes are ADD_INT, so higher than
statically (which was 0.1%) but still small enough that I'm abandoning work on
ADD_INT.
I've got a branch where I'm adding POP_JUMP_IF_NONE and POP_JUMP_IF_N
Guido van Rossum added the comment:
> Interesting. What code did you use to collect statistics?
For static statistics I wrote my own script:
https://github.com/python/cpython/pull/25090/files#diff-994d3592c951c78cbe71084d562590d1507ddfed767e2ec040f5e2610845a11c.
I can add that to To
Guido van Rossum added the comment:
Yeah, I do not think anyone cares. :-)
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
Oh, nice improvement suggestion for the docs! Do you feel comfortable
submitting a small PR for that?
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
Yeah, I've received many warnings about benchmark hacking already, and we
won't fall to that.
For static statistics, it's easy enough to either download a thousand of
the most popular projects from GitHub or PyPI and just try to compile al
Guido van Rossum added the comment:
Go for it! I assume that this will be pretty simple, right? TypeGuard[X] should
show up in __annotations__ as exactly that. It can be implemented in pure
Python.
--
___
Python tracker
<https://bugs.python.
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue43739>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Guido van Rossum :
When building from scratch on Windows I get this warning:
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winbase.h(103):
warning C4005: 'Yield': macro redefinition
[C:\Users\gvanrossum\cpython\PCbuild\pythoncore.vcxproj]
I kno
Guido van Rossum added the comment:
I assume the OP wants to have a class that doesn't allow positional patterns.
The right way to spell that is indeed to add
__match_args__ = ()
to the class, there's no need to add another flag to @dataclass.
--
resolution: -> r
Guido van Rossum added the comment:
Thanks! Dup of bpo-43244.
--
resolution: -> duplicate
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
Yes.--
--Guido (mobile)
--
___
Python tracker
<https://bugs.python.org/issue43772>
___
___
Python-bugs-list mailin
Guido van Rossum added the comment:
Just Don't Do This.
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Guido van Rossum added the comment:
Do you need anything from me here?
--
___
Python tracker
<https://bugs.python.org/issue43761>
___
___
Python-bugs-list mailin
Guido van Rossum added the comment:
So, should we reopen this ad add the flag to suppress __match_args__ generation
after all?
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
I don't think we need control at the field level here. Omitting one field
is just going to cause confusion.
--
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
Hm, reading the thread it's not 100% clear to me what you are proposing to do
in your patch, since different people seem to have proposed different things.
I think I'd be okay if `foo[bar]: baz` and `foo.bar: baz` (etc.) didn't
generate
Guido van Rossum added the comment:
Are there other cases where suppressing one thing affects others?
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
There may be other reasons why `__init__` is not desired, and there's no
absolute requirement that `__match_args__` must match the constructor --
only a convention. I'd say don't tie them together.
--
___
Guido van Rossum added the comment:
LGTM
--
___
Python tracker
<https://bugs.python.org/issue43764>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
New changeset ac05f82ad4983e3d3653ae7494c1ff62c4a265fc by DevilXD in branch
'master':
bpo-41974: Remove part of the note regarding complex.__float__ (GH-25197)
https://github.com/python/cpython/commit/ac05f82ad4983e3d3653ae7494c1ff
Guido van Rossum added the comment:
New changeset 522433601a5c64603dab3d733f41a5db39d237eb by Jelle Zijlstra in
branch 'master':
bpo-43783: Add ParamSpecArgs/Kwargs (GH-25298)
https://github.com/python/cpython/commit/522433601a5c64603dab3d733f41a5
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
New changeset 9045919bfa820379a66ea67219f79ef6d9ecab49 by Jelle Zijlstra in
branch 'master':
bpo-43772: Fix TypeVar.__ror__ (GH-25339)
https://github.com/python/cpython/commit/9045919bfa820379a66ea67219f79e
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
Dominic, thanks so much for the backport!
--
___
Python tracker
<https://bugs.python.org/issue42059>
___
___
Python-bug
Guido van Rossum added the comment:
New changeset 852150ddfe68bc2696fc880175aeb855a0c16ae6 by Ken Jin in branch
'master':
bpo-42904: Fix get_type_hints for class local namespaces (GH-24201)
https://github.com/python/cpython/commit/852150ddfe68bc2696fc880175aeb8
Guido van Rossum added the comment:
Hi Ken Jin, you can close this issue now with your new permissions, right?
--
___
Python tracker
<https://bugs.python.org/issue42
Guido van Rossum added the comment:
Batuhan, can you summarize the argument from the thread? What do you think
yourself? Myself, I'm not sure either way, but it seems okay to remove the
remnant bytecode.
--
___
Python tracker
&
Guido van Rossum added the comment:
It's fair that get_type_hints() does too much. But what does your proposed
function do besides this?
{k: eval(v) for k, b in x.__annotations__.items()}
?
--
___
Python tracker
<https://bugs.py
Guido van Rossum added the comment:
I'd say just submit the PR. Shouldn't be problematic. (Have you decided
what to do if the eval() fails?)
--
___
Python tracker
<https://bugs.python.o
Guido van Rossum added the comment:
New changeset a9cf69df2e031d6157f01289f66ca9cf723ceb5c by Karthikeyan
Singaravelan in branch 'master':
bpo-41515: Fix KeyError raised in get_type_hints (GH-25352)
https://github.com/python/cpython/commit/a9cf69df2e031d6157f01289f66ca9
Guido van Rossum added the comment:
Thanks -- odd this didn't fail in CI. We'll get it fixed.
--
___
Python tracker
<https://bugs.python.org/issue41515>
___
__
Change by Guido van Rossum :
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue40222>
___
___
Python-bugs-list mailing list
Unsubscribe:
1801 - 1900 of 5533 matches
Mail list logo