Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'repository': 0.05; 'string': 0.09; 'cc:addr:python-list': 0.11; "wouldn't": 0.14; '"-"': 0.16; '24,': 0.16; 'fine.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:OOP': 0.16; 'substitute': 0.16; 'tuple': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'comparing': 0.24; 'cc:2**0': 0.24; 'compare': 0.26; 'this:': 0.26; 'skip:" 20': 0.27; 'header:In- Reply-To:1': 0.27; 'character': 0.29; 'message- id:@mail.gmail.com': 0.30; 'included': 0.31; 'tuples': 0.31; 'subject:from': 0.34; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'subject:one': 0.36; 'should': 0.36; 'pm,': 0.38; 'then,': 0.60; 'simply': 0.61; 'name': 0.63; 'combining': 0.68; 'special': 0.74; 'subject:Moving': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=4NET+qM9E+mA+6yBjEVTQ80b1Y66kyguOlIh4unxCTU=; b=B/n4Azma/hEN3A+pPfei+di6rDw4gVU4niE3F2vbPZjiV3T/Boj8F8XFWBcgmB7/6E s7qv5nDfPoV1l04505ORTJQBa5rY3OqtvBU2W4OB6Z1Am4j3svp+8v0lid5zdcktHxbI yXQoQXZ/4ElIi7eUKMxXZ8dbz59XVoXl6yfgpZ/apDz5199pW6H3mFLXkiErFLqn2N+h jNZBwc0Dff7aZF7TEESMYZu8HQb9ePphhJ4tHUSL6NZXrLrhQalyXrJ6TIpMih5prhT/ 4e/hhEsdZWFZPu3pl7xKt+zsGefpZJTnA0eR8MOEeL11SRVjrnOsecyjyxvRTYXNxTqy uIhw== MIME-Version: 1.0 X-Received: by 10.52.160.98 with SMTP id xj2mr87425vdb.80.1398324989647; Thu, 24 Apr 2014 00:36:29 -0700 (PDT) In-Reply-To: <6bf23ea5-e534-486e-adc9-675fe97fa414@googlegroups.com> References: <80a82415-fc67-4ccf-8827-27a0ba5459b7@googlegroups.com> <6bf23ea5-e534-486e-adc9-675fe97fa414@googlegroups.com> Date: Thu, 24 Apr 2014 17:36:29 +1000 Subject: Re: Moving to an OOP model from an classically imperitive one From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1398324998 news.xs4all.nl 2892 [2001:888:2000:d::a6]:59397 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:70569 On Thu, Apr 24, 2014 at 5:21 PM, 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 t= he repository name, that is, if I were to create a "unique-program-name" st= ring 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