On 2021-03-16 06:20, Eric V. Smith wrote:
I'd like to avoid field() as much as possible. I think it's just too
easy to miss what it's doing, since it has many arguments. And I'd like
to make it easy to have a style that encourages all non-keyword-only
fields to come first.

From my perspective it's quite the contrary. `field` is an actual function call and its arguments may affect its behavior in the way that arguments generally affect function calls. This thing with a dummy attribute holding a magic value whose sequential position in the class body influences *different* attributes based on their *relative* sequential position. . . I find that much more confusing and strange. I think Simão's version where you give a class-level default for keyword-only-ness and then override it with field() arguments where necessary is much cleaner.

--
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail."
   --author unknown
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/SWOLR3XPQ4PZ6UYFZEWVJVIJHDBHBUIV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to