[Tutor] Beginners question

Alan Gauld alan.gauld at yahoo.co.uk
Mon Apr 6 05:41:19 EDT 2020


On 06/04/2020 06:52, Cameron Simpson wrote:
> On 05Apr2020 23:50, Alan Gauld <alan.gauld at yahoo.co.uk> wrote:
>> Looking at the code below, does this only work with
>> format strings? Or was it only introduced with
>> format strings? I'm still on 3.6 so that may be why
>> I've never seen it before...

> If you mean the "{first=}" notation, that is very recent. Maybe 3.8?

No, I meant the ability to provide a __format__() operation in a class.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list