Re: Why don't stringobjects have methods?
Daniel W. Connolly (connolly@hal.com)
Fri, 01 Apr 1994 14:05:43 -0600
In message <9404011941.AA03758@corp.infoseek.com>, Jim Roskind writes:
>> >>> Stats('profile.1').sort_stats(1).print_stats() and None
>> >>>
>
>Nice hack!!! :-) :-) I think I'll use this as a *better* hack in many
>cases, BUT it still does not quite achieve the intent of disposing of
...
>Isn't it obvious that what is really needed is another statement in
>Python?
Modula-3 has an EVAL statement for this purpose.
1 + 2;
is a static (i.e. compile-time) error. You have to write
EVAL 1 + 2;
Dan