On Sat, Apr 6, 2013 at 8:18 PM, Roy Smith <r...@panix.com> wrote:
> In article <mailman.222.1365299932.3114.python-l...@python.org>,
>  Ian Kelly <ian.g.ke...@gmail.com> wrote:
>
>> On Sat, Apr 6, 2013 at 7:29 PM, Steven D'Aprano
>> <steve+comp.lang.pyt...@pearwood.info> wrote:
>> > For some definition of "easily".
>> >
>> > if implementation == "CPython":
>> >     if version < "3.3":
>> >         if sys.maxunicode exists:
>> >             use it to decide whether this is a wide or narrow build
>> >             if a wide build: return 4
>> >             else: return 2
>> >         else:
>> >             ???
>> >     elif version == "3.3":
>> >         scan the string, in some efficient or inefficient way
>> >         return 1, 2, 4 depending on the largest character you find
>> >     else:
>> >         ???
>> > else:
>> >     ???
>>
>> None of which goes away if a char width function is added to 3.4 and
>> you still want to support earlier versions as this does.  It just adds
>> another "if".
>
> The same is true of any new feature.  That doesn't mean we shouldn't add
> new features.

If you're interested in backward compatibility, then as noted the
feature doesn't really make things any simpler for you.  Otherwise,
the only implementation that matters from the above is the 3.3 one,
which isn't much more complex.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to