Ron Adam wrote:
> 
> I'm not sure what you mean by "ditch all of these".

I was guessing that what's meant by returning a
(value, format_spec) tuple is to re-try the
formatting using the new value and spec. That's
what I thought was unnecessary, since the method
can do that itself if it wants.

> The output in this case is a null string. Setting the format spec to 
> None tell the format() function not to do anything more to it.

Then why not just return an empty string?

> The format function would first call the objects __format__ method and 
> give it a chance to have control, and depending on what is returned, try 
> to handle it or not.

Okay, I see now -- your format function has more smarts
in it than mine.

But as was suggested earlier, returning NotImplemented
ought to be enough to signal a fallback to a different
strategy.

--
Greg
_______________________________________________
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

Reply via email to