> Given that you can, today, subclass str in Python, without wasting an
> extra 4/8 bytes of memory, or adding anything new to the class object,
> why wouldn't anyone who really wanted to make a hypothetical optimized
> subclass just use the same mechanism (putting your additional data
> *after* the character data) to subclass it in C?
> 
> It may be a little tricky, but not exactly rocket science

I believe many people do consider it rocket science, or at least so much
out of their reach that it doesn't actually come to their mind as a
possible solution.

I'm really curious about Stefan's explanation why efficient subclassing
of str is not possible in Cython (is it not possible at all? is it
possible but inefficient? if so, how much, and why?)

Regards,
Martin
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to