print a ... z, A ... Z, "\n"' in Python

Lloyd Zusman ljz at asfast.com
Sat Mar 3 07:22:47 EST 2007


"js " <ebgssth at gmail.com> writes:

>> But note that you return the last item of the range too, and that
>> goes against the semantic of the usual Python range/xrange, so you
>> may want to call this function with another name.
>
> That makes sense. 100% agree with you.
>
>> Maybe there are better ways to solve this problem. Maybe a way to
>> generate (closed?) char ranges can be added to the Python standard
>> lib.
>
> Maybe we don't want char range If string constants would be rich
> enough.

But as soon as we want a string that doesn't correspond to any
pre-defined constants, we're hosed.  For example, there isn't
a constant that would correspond to this Perl-ism:

  print l ... w, e ... j, L ... W, E ... J, "\n";


-- 
 Lloyd Zusman
 ljz at asfast.com
 God bless you.




More information about the Python-list mailing list