[Tutor] str.replace error

Alan Gauld alan.gauld at yahoo.co.uk
Fri Apr 26 04:17:56 EDT 2019


On 26/04/2019 05:29, Steven D'Aprano wrote:

> (deliberately? accidently?) run into one of the slightly advanced 
> corners of Python: unbound methods.

Ooh, good catch. I completely forgot that the string class'
name is str...

That's why he didn't get a name error...

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