orlnub123 added the comment:
The comments in object's source explain the rationale behind this:
/* You may wonder why object.__new__() only complains about arguments
when object.__init__() is not overridden, and vice versa.
Consider the use cases:
1. When neither is overridde
orlnub123 added the comment:
I take back my previous suggestion, I agree that documenting it in setattr()
(and **kwargs) is the way to go. It's obvious that you can assign anything to
the __dict__, since it represents a dict, but setattr() is more ambiguous.
'Anything' was t
orlnub123 added the comment:
The customizing attribute access section of the data model might be a suitable
place.
--
___
Python tracker
<https://bugs.python.org/issue35
orlnub123 added the comment:
I'd argue that it's an implementation detail. Documenting it might be nice as
some projects such as pytest do use it but I don't think it would make sense in
setattr() or getattr() since all they do (at least in this case) is
assign/retrieve fr
orlnub123 added the comment:
Added the requested test cases. They aren't an exact match but they should
serve the same purpose.
--
___
Python tracker
<https://bugs.python.org/is
Change by orlnub123 :
--
keywords: +patch
pull_requests: +9527
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35101>
___
___
Python-
New submission from orlnub123 :
If you pass a frame object belonging to a class into findsource, it'll
incorrectly give you the starting line number of the first function above it or
0 if no functions are defined.
Here's some code to reproduce the issue:
import inspect
def
Change by orlnub123 :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
orlnub123 added the comment:
Happy to help! I'm surprised it got merged so quickly, amazing response times
all-around.
--
___
Python tracker
<https://bugs.python.org/is
Change by orlnub123 :
--
keywords: +patch
pull_requests: +8996
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34819>
___
___
Python-
New submission from orlnub123 :
The map and as_completed functions can randomly timeout earlier or later due to
NTP stepping the clock or something changing the time and/or date.
Here's some code to reproduce the issue for map:
import concurrent.futures
import time
Change by orlnub123 :
--
pull_requests: +8496
___
Python tracker
<https://bugs.python.org/issue34282>
___
___
Python-bugs-list mailing list
Unsubscribe:
orlnub123 added the comment:
> Fixing bugs is often not backwards-compatible. ;) I think the number
> of affected people here will be low, though, because anybody who had an
> _convert member should have noticed that they couldn't use it.
I think we had a misunderstandin
orlnub123 added the comment:
> For versions 3.6 and 3.7 the solution is to modify the shadow check at line
> 236 so only DynamicClassAttributes are /not/ shadowed (meaning the _convert
> method would be shadowed by an _convert member).
Doing that might not be backwards-compatible
orlnub123 added the comment:
After some thinking I've come to the conclusion that making the __str__s use
the fully qualified name was a bad idea. I've closed my PR.
--
___
Python tracker
<https://bugs.python.o
orlnub123 added the comment:
I've created a separate PR that also changes the __str__s.
--
nosy: +orlnub123
___
Python tracker
<https://bugs.python.org/is
Change by orlnub123 :
--
pull_requests: +8481
___
Python tracker
<https://bugs.python.org/issue34443>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from orlnub123 :
If an enum has a member named _convert it gets shadowed by the _convert method
as shown below.
>>> import enum
>>>
>>> class Test(enum.Enum):
... _convert = enum.auto()
...
>>> Test._convert
>
I've came up wit
Change by orlnub123 :
--
keywords: +patch
pull_requests: +8080
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34282>
___
___
Python-
19 matches
Mail list logo