[Python-Dev] PEP 257 and __init__

2015-12-29 Thread Facundo Batista
Hola! (I was doubting in sending this mail to this list or to the normal one, but as it affects a "style recommendation" we propose for the whole community, I finally sent it here) I was reading PEP 257 and it says that all public methods from a class (including __init__) should have a

Re: [Python-Dev] PEP 257 and __init__

2015-12-29 Thread Andrew Barnert via Python-Dev
On Dec 29, 2015, at 13:03, Facundo Batista wrote: > >> On Tue, Dec 29, 2015 at 4:38 PM, Andrew Barnert wrote: >> I usually just don't bother. You can violate PEP 257 when it makes sense, >> just like PEP 8. They're just guidelines, not iron-clad

Re: [Python-Dev] PEP 257 and __init__

2015-12-29 Thread Ben Finney
Facundo Batista writes: > Note that I'm ok to include a docstring when the actual behaviour > would deviate from the expected one as per Reference Docs. My point is > to not make it mandatory. I disagree with the exception you're making for ‘__init__’. The parameters

Re: [Python-Dev] PEP 257 and __init__

2015-12-29 Thread Fred Drake
On Tue, Dec 29, 2015 at 1:27 PM, Facundo Batista wrote: > I was reading PEP 257 and it says that all public methods from a class > (including __init__) should have a docstring. > > Why __init__? > > It's behaviour is well defined (inits the instance), and the >

Re: [Python-Dev] PEP 257 and __init__

2015-12-29 Thread Facundo Batista
On Tue, Dec 29, 2015 at 4:38 PM, Andrew Barnert wrote: > Isn't the same thing true for every special method? There are lots of classes > where __add___ just says "a.__add__(b) = a + b" or (better following the PEP) > "Return self + value." But, in the rare case where the

Re: [Python-Dev] PEP 257 and __init__

2015-12-29 Thread Andrew Barnert via Python-Dev
On Dec 29, 2015, at 10:27, Facundo Batista wrote: > I was reading PEP 257 and it says that all public methods from a class > (including __init__) should have a docstring. > > Why __init__? > > It's behaviour is well defined (inits the instance), and the >

Re: [Python-Dev] PEP 257 and __init__

2015-12-29 Thread Terry Reedy
On 12/29/2015 2:40 PM, Fred Drake wrote: On Tue, Dec 29, 2015 at 1:27 PM, Facundo Batista wrote: I was reading PEP 257 and it says that all public methods from a class (including __init__) should have a docstring. Why __init__? It's behaviour is well defined (inits

Re: [Python-Dev] Is there a reference manual for Python bytecode?

2015-12-29 Thread Wes Turner
numba * http://numba.pydata.org/numba-doc/0.16.0/modules/numba.html#module-numba.bytecode * https://github.com/numba/numba/blob/master/numba/bytecode.py pypy * http://doc.pypy.org/en/latest/interpreter.html * http://aosabook.org/en/pypy.html ... http://compilers.pydata.org/ #Bytecode Utilities

Re: [Python-Dev] Is there a reference manual for Python bytecode?

2015-12-29 Thread Erik
Hi Nick, On 29/12/15 02:46, Nick Coghlan wrote: 1. The interpreter's bytecode generation is inconsistent with the implementation of the eval loop Essentially, this was my problem. I'd neglected to add the reference to TARGET_NEW_OP2 to Python/opcode_targets.h (so staring hard at the op