Greg Ewing <[EMAIL PROTECTED]> writes: > It might be possible to represent it in a narrower format, > however. Perhaps there should be an explicit operation for > re-packing a string into the narrowest possible format?
I suppose it's better to always normalize a polymorphic string representation. And always normalize bignums to fixnums (long->int). It increases chances of using the more compact representation. It doesn't add any asymptotic cost, it's done when the whole object is to be allocated anyway (these are immutable objects). It simplifies equality comparison. The narrow formats should be statistically more common than wide formats anyway. Programmers should not be expected to care about explicitly calling a normalization function. -- __("< Marcin Kowalczyk \__/ [EMAIL PROTECTED] ^^ http://qrnik.knm.org.pl/~qrczak/ _______________________________________________ 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