On 8/5/07, Talin <[EMAIL PROTECTED]> wrote: > Ron Adam wrote: > > To me there is an underlying consistency with grouping abstract/indirect > > types with more concrete types rather than makeing an exception in the > > field alignment specifier. > > > > Moving repr to the format side sort of breaks the original clean idea of > > having a field alignment specifier and separate type format specifiers. > > The reason for this is because of the constraint that apply_format never > looks at the format specifier, so overrides for repr() can only go in > the thing that it does look at - the alignment spec.
How important is this constraint? In my proposal, apply_format (which I called handle_format, alas) immediately called __format__. Only if __format__ didn't exist or it returned NotImplemented would it check what type was expected and attempt a coercion (__float__, __index__, etc), then calling __format__ on that. -- Adam Olsen, aka Rhamphoryncus _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
