Skip to content

Instantly share code, notes, and snippets.

@nicolasfig nicolasfig/

Created Oct 10, 2012
What would you like to do?
Patron singleton by Rafa.
class BecaEstudiante:
beca= None
cont= 0
def getBeca(cls,nombreBecado):
if cls.cont<5:
cls.beca= BecaEstudiante()
print("Beca creada socio",nombreBecado,"!")
print("No se creo la beca socio!")
return cls.beca
beca0= BecaEstudiante.getBeca("Nico")
beca1= BecaEstudiante.getBeca("Yisus")
beca2= BecaEstudiante.getBeca("Fuckencio")
beca3= BecaEstudiante.getBeca("Trollencio")
beca4= BecaEstudiante.getBeca("Fapencio")
beca5= BecaEstudiante.getBeca("Perrencio")
beca6= BecaEstudiante.getBeca("Putencia")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.