checking if a list is empty

Chris Angelico rosuav at gmail.com
Sat May 21 23:52:05 EDT 2011


On Sun, May 22, 2011 at 1:02 PM, rusi <rustompmody at gmail.com> wrote:
> Why is the C library in linux called libc6 and not just libc?

I assume you mean this? http://www.linux-m68k.org/faq/glibcinfo.html

When you dynamically link against a shared object, you save on
executable size, but you have to have that shared object on the target
system. That's completely different from API changes. I could compile
my code using half a dozen different compilers, and use dynamic
linking each time, and then those six binaries would expect six
implementations of libc on the target computer. They're incompatible
with each other. But they will all have a size_t strlen(const char *)
that tells me how long my string is.

Everyone has a different way of handling incompatible API changes. The
most common is to simply deprecate the old function and create a new
one. It's simple and effective. With your original xyzzy function,
create a my_xyzzy as per Steven's suggestion; job done. (I'd assume
that a function called "my_xyzzy" is a local override, in the same way
that I might write a "my_malloc" that does some statisticking and then
returns malloc(sz), but that's one of the consequences of trivia - you
can't really name it descriptively.)

Chris Angelico



More information about the Python-list mailing list