[issue9117] class syntax not fully documented in reference manual

2010-10-17 Thread Georg Brandl
Georg Brandl added the comment: This patch was mostly out-of-date since PEP 3115 metaclasses are now documented; I've merged what was missing in r85626. -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker

[issue9117] class syntax not fully documented in reference manual

2010-06-29 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file17805/issue9117_v2.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue9117] class syntax not fully documented in reference manual

2010-06-29 Thread Mark Dickinson
Mark Dickinson added the comment: And the same patch, but this time *without* the irrelevant audioop changes. :) -- Added file: http://bugs.python.org/file17806/issue9117_v2.patch ___ Python tracker ___

[issue9117] class syntax not fully documented in reference manual

2010-06-29 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch. I've reorganized that documentation section a bit, and added a link to PEP 3115. This isn't ideal, but it's better than nothing. -- Added file: http://bugs.python.org/file17805/issue9117_v2.patch __

[issue9117] class syntax not fully documented in reference manual

2010-06-29 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, good plan. I'll do that. I'm also not sure about the 'comprehension' bit; it's true that a comprehension is syntactically valid here (e.g., "class A(x for x in range(3))"), but it's also entirely useless: it has to be the sole argument, so there can'

[issue9117] class syntax not fully documented in reference manual

2010-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The production looks right to me, but I think it should be broken in two or more lines. Since it is rendered pre-formatted, long line results in a horizontal scroll bar unless the browser window is extremely wide. -- __

[issue9117] class syntax not fully documented in reference manual

2010-06-29 Thread Mark Dickinson
Mark Dickinson added the comment: It looks like fixing the production list is the easy part (see attached patch): as far as I can tell, the *syntax* for class definitions is pretty much identical to that for function calls. (The semantics are different, of course.) It would be good if some

[issue9117] class syntax not fully documented in reference manual

2010-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > I believe that *args and **kwargs are now also syntactically > accepted in a class definition. Indeed: >>> class a: pass >>> class b: pass >>> bases = (a, b) >>> class c(*bases): pass >>> kwds = {'metaclass':type} >>> class c(*bases, **kwds): pass wor

[issue9117] class syntax not fully documented in reference manual

2010-06-29 Thread Mark Dickinson
Mark Dickinson added the comment: Am working on a patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue9117] class syntax not fully documented in reference manual

2010-06-29 Thread Mark Dickinson
New submission from Mark Dickinson : Looking at: http://docs.python.org/dev/py3k/reference/compound_stmts.html#class-definitions I see: classdef::= [decorators] "class" classname [inheritance] ":" suite inheritance ::= "(" [expression_list] ")" classname ::= identifier this seems to