[Python-ideas] Statement local functions and classes (aka PEP 3150 is dead, say 'Hi!' to PEP 403)
Carl M. Johnson
cmjohnson.mailinglist at gmail.com
Fri Oct 14 09:18:28 CEST 2011
On Oct 13, 2011, at 8:56 PM, Greg Ewing wrote:
> I would also be inclined to add that if you're using the
> 'given' style in a particular function, you should use
> it *consistently*. For instance, consider the earlier example
>
>> result = flange(thingie) given:
>> thingie = doohickie(majiger) given:
>> part_a = source / 2
>> part_b = source ** 2
>> majiger = blender(part_a, part_b)
>
> Why have we used the 'given' style for 'thingie' and
> 'majiger', but fallen back on the sequential style for
> 'part_a' and 'part_b'?
That's more-or-less my point. The ability to write arbitrary code with given will create a lot of arguments about style. One person will use it in one place but not another, then someone will say, hey, let's make it more consistent, but then that's going too far… and it becomes an attractive nuisance for pointless rewrites.
More information about the Python-ideas
mailing list