[Baypiggies] Companies moving to Python 3?
Aahz
aahz at pythoncraft.com
Fri Oct 16 23:39:45 CEST 2015
On Fri, Oct 16, 2015, Marilyn Davis wrote:
>
> In 3, I'll have to apologize for the "(object)", which they don't yet
> understand because they don't know yet about inheritance.
What "object"? Here's code that works perfectly well in both Python2
and Python3, modulo the print:
class SimpleBunch:
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
x = SimpleBunch(a='foo', x='bar')
print(x.a)
I don't see any "object" there....
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
import antigravity
More information about the Baypiggies
mailing list