one-time factory in python for an experienced java guy
Stefan Behnel
stefan_ml at behnel.de
Tue Jul 14 10:27:48 EDT 2009
phonky wrote:
> class Account(object):
> def __init__(self, holder):
> self.__accountnumber = self.__generate_account_number()
>
> Now, I do not know yet how the account number scheme looks like.
> For now, I just want to have an incremental number; later,
> when going to production, we'll need the proper one.
Use a global variable in the module.
Stefan
More information about the Python-list
mailing list