[Python-ideas] Specifying constants for functions
Sven R. Kunze
srkunze at mail.de
Tue Oct 27 17:50:16 EDT 2015
On 27.10.2015 21:30, Yury Selivanov wrote:
> On 2015-10-27 4:22 PM, Nikolaus Rath wrote:
>> Because it leaks into the enclosing scope.
>
> Leaks what?
> Name? Name it _SENTINEL then.
I think because it's missing the relationship with foo. So, better do this
foo._sentinel = object()
It's coupled to foo and moved out of the outer scope.
Best,
Sven
More information about the Python-ideas
mailing list