> If SimpleNamespace were to become a builtin, what should its name be?
Just to have the obvious out of the way:
* obj() - fits with most other builtins in that they are abbreviations
and 3-4 letters
* data() - same, might be confused with dataclass
* container()
* values()
Most of these are lik
Abdulla Al Kathiri writes:
Condensing to the parts which are in question,
> def test(self, func: t.Callable[..., bool], *args, **kwargs) -> Predicate:
> return self._build_predicate(
>lambda lhs, value: func(lhs, *args, **kwargs),
> Operation.TEST,
>
Hello,
On Sat, 20 Feb 2021 00:23:13 +0900
"Stephen J. Turnbull" wrote:
> Abdulla Al Kathiri writes:
>
> Condensing to the parts which are in question,
>
> > def test(self, func: t.Callable[..., bool], *args, **kwargs) ->
> > Predicate: return self._build_predicate(
> >lamb
Imagine specifying multiple same types. Awful.
```
from typing import Tuple
def time() -> Tuple[int, int, int, int, int, int, int, str]:
""" Return (year, month, day, hour, minute, second, millisecond, timezone
name).
...
```
So I suggest a new syntax, ``Seq[type * times]``, to solve this
Does this work?
>>> tuple[(int,) * 7 + (str,)]
tuple[int, int, int, int, int, int, int, str]
___
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/l