[Tutor] What exactly does the three dots do? Why such as thing?

Alan Gauld alan.gauld at yahoo.co.uk
Thu Aug 10 19:23:46 EDT 2017


On 10/08/17 14:39, C W wrote:

> I suppose it's just a place holder, though I don't know when I would use it
> in my every day life.

Probably never.

Like most programming languages Python has a load of rarely used,
obscure features. Most Python programmers never use ellipses,
metaclasses(*), the __new__() constructor, the _ variable or
even the else clause in a loop. That doesn't mean you shouldn't
look into them - they might just be the bit of magic you
need - but don't feel you need to have a use for every
bit of the language.

(*) Actually, everyone uses metaclasses, but very few define
their own!

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