David Flanagan wrote:
> Yukihiro Matsumoto wrote:
>> Hi,
>>
>> In message "Re: String.ord"
>>     on Tue, 6 Feb 2007 07:03:05 +0900, David Flanagan 
>> <david / davidflanagan.com> writes:
>>
>> |Does anyone (Matz?) know why the (new in 1.9) String.ord method is 
>> |restricted to one-character Strings?
>>
>> I just followed Python convention here.
> 
> Ah ha.  I don't know Python well enough, or maybe I would have realized 
> that.
> 
> It still seems to me that there ought to be a way to get the 1.8 
> behavior in a single method call rather than having to call [] and then 
> call ord on the result.  If you don't want to modify ord to accept an 
> index, Would you consider ordAt(x) or codepoint(x) or something like that?
> 
>     David

How would String#ord_at be a savings over String#[].ord?

I'm afraid I don't see such a method as being general enough to warrant 
inclusion as part of the core class.

Regards,

Dan