On Mon, 28 Aug 2017 11:27 pm, Pavol Lisy wrote:
> object = int # this could be trick
> ...
> class Spam(object):
> ...
>
> dis.dis show difference too, next line is just for "class
> Spam(object):" version:
> LOAD_GLOBAL 0 (object)
>
> So nor rebinding object nor rebinding
On 8/28/17, Steven D'Aprano wrote:
> In Python 3, what's the difference between these two classes?
> # implicitly inherit from object
> class Spam:
> ...
>
> # explicitly inherit from object
> class Spam(object):
> ...
>
> If you sense a trick question, you're right :-)
>
object = int #
In Python 3, what's the difference between these two classes?
# implicitly inherit from object
class Spam:
...
# explicitly inherit from object
class Spam(object):
...
S
P
O
I
L
E
R
S
P
A
C
E
If you sense a trick question, you're right :-)
--
“You are deluded if you think