[issue19431] Document PyFrame_FastToLocals() and PyFrame_FastToLocalsWithError()

2018-01-12 Thread João Sebastião de Oliveira Bueno
João Sebastião de Oliveira Bueno added the comment: This discussion is fresh, so maybe it is worth asking here prior to python-ideas: In Python we can change any global variable, object attribute or mapping-value with function calls. Locals and nonlocals are the only exceptions and from time

[issue28672] Explain in the "Data Model" document why arguments to __init__ are ok when __new__ is not defined

2016-11-11 Thread João Sebastião de Oliveira Bueno
New submission from João Sebastião de Oliveira Bueno: There is an specific Python behavior on object instantiation that is "expected" but not explicit, even for avanced users: When a custom class defines `__init__` with extra parameters, but do not overrides `__new__`, it simply wor

[issue11842] slice.indices with negative step and default stop

2011-04-13 Thread João Sebastião de Oliveira Bueno
João Sebastião de Oliveira Bueno added the comment: I don't see this as a bug. The indices returned in both cases are exactly what you need to feed to range, in order to get the correct indices for the provided slice parameters. Perceive that if for s = slice(None, None, -2) It