[Tutor] question about operator overloading

Alan Gauld alan.gauld at btinternet.com
Tue Mar 6 00:20:21 CET 2012

On 05/03/12 21:25, Dave Angel wrote:

> It's not clear what __add__() should mean for physical files.

My guess would be similar to the cat operator in Unix:

$ cat file1, file2 > file3

is equivalent to

file3 = file1 + file2

But of course, thats just my interpretation of file addition...

Alan G
Author of the Learn to Program web site

More information about the Tutor mailing list