A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-September/149373.html below:

[Python-Dev] PEP 557: Data Classes

[Python-Dev] PEP 557: Data Classes [Python-Dev] PEP 557: Data ClassesEric V. Smith eric at trueblade.com
Fri Sep 8 12:07:42 EDT 2017
Hah! Thanks for the catch. 

There is no C in my happy place. 

--
Eric.

> On Sep 8, 2017, at 8:52 AM, Paul Moore <p.f.moore at gmail.com> wrote:
> 
>> On 8 September 2017 at 15:57, Eric V. Smith <eric at trueblade.com> wrote:
>> I've written a PEP for what might be thought of as "mutable namedtuples with
>> defaults, but not inheriting tuple's behavior" (a mouthful, but it sounded
>> simpler when I first thought of it). It's heavily influenced by the attrs
>> project. It uses PEP 526 type annotations to define fields.
> [...]
>> The PEP is largely complete, but could use some filling out in places.
>> Comments welcome!
>> 
>> Eric.
>> 
>> P.S. I wrote this PEP when I was in my happy place.
> 
> Looks good! One minor point - apparently in your happy place, C and
> Python have the same syntax :-)
> 
> """
> field's may optionally specify a default value, using normal Python syntax:
> 
> @dataclass
> class C:
>    int a       # 'a' has no default value
>    int b = 0   # assign a default value for 'b'
> """

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4