Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: iso-8859-1 -*-
- # init.py
- class Person:
- def __init__(self,nome):
- self.nome = nome
- def alo(self):
- print 'Alô, meu nome é',self.nome
- p = Person('Samuel')
- p.alo()
- print 'chamando com outra sintaxe'
- Person('Samuel').alo()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement