Peter Otten added the comment:

As every beginner will learn about (and probably overuse) range() pretty soon I 
think it's OK to use that form. 

The math-inspired notation [0, 255] may be misinterpreted as a list. You also 
lose the consistency of preferring half-open intervals everywhere.

The third alternative I see,

0 <= x < 256

has the problem that it requires a name (the 'x') that may not correspond to a 
variable in the source code. You'd also need to clarify that x must be an int 
to make the message bulletproof.

I think this should be left as is.

----------
nosy: +peter.otten

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21177>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to