Original Post
class Packet(object): blah blah blah
def encode(payload):
if type(payload) is not type(Packet()):
raise MyException("LayerThree.encode(payload): payload must be a packet")
now do some stuff this can't possibly be the Pythonic solution to 'typifying' arguments. [Edited by - thedustbustr on February 19, 2007 10:20:05 PM]