# -*- coding: utf-8 -*-
class Baller(object):
def __init__(self, shooting, passing, iq):
self.shooting = shooting
self.passing = passing
self.iq = iq
curry = Baller(100, 99, 99)
print(type(curry) == Baller)
if hasattr(curry, 'shooting'):
print('Curry\'s shooting: %s' % getattr(curry, 'shooting'))
Sign in to make a reply
岁益寒
# -*- coding: utf-8 -*-
class Baller(object):
def __init__(self, shooting, passing, iq):
self.shooting = shooting
self.passing = passing
self.iq = iq
curry = Baller(100, 99, 99)
print(type(curry) == Baller)
if hasattr(curry, 'shooting'):
print('Curry\'s shooting: %s' % getattr(curry, 'shooting'))