ACTIVITY SUMMARY (2021-10-15 - 2021-10-22)
Python tracker at https://bugs.python.org/
To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.
Issues counts and deltas:
open7199 (-202)
closed 50111 (+289)
total 57310 (+87)
Open issues
Most of the discussion so far has been focused on (?.). Tbh though, I'm more
interested in (??) and (??=). Just reading through code, I constantly notice
boilerplate like this which could easily be substituted.
variable = some_function(...)
if variable is None:
variable = [] # some default
On Sat, Oct 23, 2021 at 6:20 AM Marc Mueller wrote:
>
> Most of the discussion so far has been focused on (?.). Tbh though, I'm more
> interested in (??) and (??=). Just reading through code, I constantly notice
> boilerplate like this which could easily be substituted.
>
> variable = some_funct
Larry Hastings wrote:
> In Python, if you evaluate an undefined name, Python raises a
> NameError. This is so consistent I'm willing to call it a "rule".
Would it help the think of the function creation as catching that exception,
and then finishing construction with its own version of NaN?
Hello!
> This would affect code that expects annotations to always be strings, but such
> code would have to be poking directly at function objects (the
> __annotations__ attribute), instead of using the advertised ways of getting
> at annotations (like typing.get_type_hints()).
I would speculat
On Thu, Oct 21, 2021 at 09:36:20PM -0700, Christopher Barker wrote:
> On Thu, Oct 21, 2021 at 5:24 PM Steven D'Aprano wrote:
>
> > Runtime type checkers already have to deal with forward refs that are
> > strings, as this is legal, and always will be:
> >
> > def function(arg:'Spam') -> Any:
> Any other runtime annotation tool has to support strings, otherwise the
> "from __future__ import annotations" directive will have already broken
> it.
Exactly- isn’t that it was deferred in 3.10, and may never be implemented?
I’ll leave it to the Pydantic developers to discuss that, but they w