In article <mailman.843.1366412626.3114.python-l...@python.org>,
 Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote:

> On Fri, 19 Apr 2013 12:02:00 -0400, Roy Smith <r...@panix.com> declaimed
> the following in gmane.comp.python.general:
> 
> > PS: a great C++ interview question is, "What's the difference between a 
> > class and a struct?"  Amazing how few self-professed C++ experts have no 
> > clue.
> 
>       It's been 15+ years but...
> 
>       "class" defaults to private; " struct" defaults to public... (very
> simplified <G>)

You were doing well until you added the "very simplified" part :-)  That 
is indeed the only difference.

Many people are surprised that you can write member functions for 
structs.  Or that you can subclass (substruct?) them.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to