Moving to an OOP model from an classically imperitive one

Chris Angelico rosuav at gmail.com
Thu Apr 24 03:36:29 EDT 2014


On Thu, Apr 24, 2014 at 5:21 PM,  <tim.thelion at gmail.com> wrote:
>> [snip]
>>
>> Could you make the program name unique just by combining it with the
>>
>> repository name in a single string?
>
> In my case I cannot.  But there is a larger reason why I wouldn't do this:  It would mean adding a special character that could not be included in the repository name, that is, if I were to create a "unique-program-name" string which was of the format repo+"-"+programName then the repo name could not have the "-" symbol in it.
>

Can you, then, simply substitute a tuple for the string? Instead of
comparing program name strings, compare tuples of (repo, program_name)
- it should work just fine.

ChrisA



More information about the Python-list mailing list