What to do after Python?

Erno Kuusela erno-news at erno.iki.fi
Sun Feb 18 20:18:47 EST 2001

In article <roy-8C4CC0.19021418022001 at news.panix.com>, Roy Smith
<roy at panix.com> writes:

| Kenneth Loafman <ken at lt.com> wrote:
|| if (strlen(s)) s[strlen(s)-1] = 0

| How about:

|    if (length = strlen(s))
|       s[length-1] = 0;

| and cut your instruction count in half :-)

a sensible optimising compiler will generate identical code for both.

  -- erno

More information about the Python-list mailing list