Re: [Python-Dev] What is the design purpose of metaclasses vs code generating decorators? (was Re: PEP 557: Data Classes)

2017-10-13 Thread Random832
On Fri, Oct 13, 2017, at 02:30, Nick Coghlan wrote: > Metaclasses currently tend to serve two distinct purposes: > > 1. Actually altering the runtime behaviour of a class and its children >in non-standard ways (e.g. enums, ABCs, ORMs) > 2. Boilerplate reduction in class definitions, reducing th

Re: [Python-Dev] What is the design purpose of metaclasses vs code generating decorators? (was Re: PEP 557: Data Classes)

2017-10-13 Thread Tin Tvrtković
> > Date: Fri, 13 Oct 2017 08:57:00 -0700 > From: Guido van Rossum > To: Martin Teichmann > Cc: Python-Dev > Subject: Re: [Python-Dev] What is the design purpose of metaclasses vs > code generating decorators? (was Re: PEP 557: Data Classes) > Message-ID: > < > cap7+vjkbvudqf09zt

Re: [Python-Dev] What is the design purpose of metaclasses vs code generating decorators? (was Re: PEP 557: Data Classes)

2017-10-13 Thread Ethan Furman
On 10/13/2017 02:35 AM, Martin Teichmann wrote: Metaclasses currently tend to serve two distinct purposes: 1. Actually altering the runtime behaviour of a class and its children in non-standard ways (e.g. enums, ABCs, ORMs) 2. Boilerplate reduction in class definitions, reducing the amount of co

[Python-Dev] Summary of Python tracker Issues

2017-10-13 Thread Python tracker
ACTIVITY SUMMARY (2017-10-06 - 2017-10-13) 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: open6251 (+26) closed 37280 (+37) total 43531 (+63) Open issues wi

Re: [Python-Dev] What is the design purpose of metaclasses vs code generating decorators? (was Re: PEP 557: Data Classes)

2017-10-13 Thread Guido van Rossum
This is food for thought. I'll have to let it sink in a bit, but you may be on to something. Since the question was asked at some point, yes, metaclasses are much older than class decorators. At some point I found the book Putting Metaclasses to Work by Ira Forman and Scott Danforth ( https://www.

Re: [Python-Dev] Scrapy Question

2017-10-13 Thread Oleg Broytman
Hello. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there a

[Python-Dev] Scrapy Question

2017-10-13 Thread Kishore Kumar Alajangi
Hi Experts, Could someone guide me how to use the code in below question(Link). https://stackoverflow.com/questions/46711909/extract-urls-recursively-from-website-archives-in-scrapy Thanks, KK. ___ Python-Dev mailing list Python-Dev@python.org https://m

Re: [Python-Dev] What is the design purpose of metaclasses vs code generating decorators? (was Re: PEP 557: Data Classes)

2017-10-13 Thread Nick Coghlan
On 13 October 2017 at 19:35, Martin Teichmann wrote: > > Metaclasses currently tend to serve two distinct purposes: > > > > 1. Actually altering the runtime behaviour of a class and its children in > > non-standard ways (e.g. enums, ABCs, ORMs) > > 2. Boilerplate reduction in class definitions, r

Re: [Python-Dev] What is the design purpose of metaclasses vs code generating decorators? (was Re: PEP 557: Data Classes)

2017-10-13 Thread Koos Zevenhoven
While I really can't continue to be active in this discussion now [*], here are some thoughts based on observations I made: These three PEPs are all essentially solving an occurrence of the same problem: PEP 549 Instance descriptors PEP 562 Module __getattr__ PEP 560 Core support for generic type

Re: [Python-Dev] What is the design purpose of metaclasses vs code generating decorators? (was Re: PEP 557: Data Classes)

2017-10-13 Thread Martin Teichmann
> Metaclasses currently tend to serve two distinct purposes: > > 1. Actually altering the runtime behaviour of a class and its children in > non-standard ways (e.g. enums, ABCs, ORMs) > 2. Boilerplate reduction in class definitions, reducing the amount of code > you need to write as the author of t