conchylicultor <etiennefg....@gmail.com> added the comment:

Yes, I know I can rename the closure, or wrap the annotation in 'quote'.

I just wanted to point this out as it felt confusing to me.
For instance, it feels inconsistent with:

```
def fn(datetime: datetime.Time):  # Works as expected
```

Or:

```
@dataclass
class A:
  datetime: datetime.Time = field(default_factory=datetime.Time.now)
```

The `datetime.Time.now` and the `datetime.Time` of the same statement refer to 
different objects.

This might be the expected behavior, but this is confusing nonetheless.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43746>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to