[Python-Dev] Pre-PEP: Allow Empty Subscript List Without Parentheses

Fredrik Lundh fredrik at pythonware.com
Sat Jun 10 09:35:21 CEST 2006


Ka-Ping Yee wrote:
> And from a syntax perspective, it's a bad idea. x[] is much
> more often a typo than an intentional attempt to index a
> zero-dimensional array.

but how often is it a typo?
for example, judging from c.l.python traffic, forgetting to add a return 
statement is a quite common, but I haven't seen anyone arguing that we 
deprecate the implied "return None" behaviour.
</F>


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /