On 18/08/2006, at 6:37 AM, David Binger wrote:
> No. You are right, this code is goofy.
> I'd prefer to leave the True/False out of it.
> The setting should be a string, or a tuple, and that's it.
> Does this look better?
>
> def get_durus_address(self):
> """() -> (host:str, port:int)|str
> The address at which the Durus StorageServer listens.
> """
> address = self.get('durus_address')
> if type(address) is tuple:
> return address
> if address:
> return join(self.get_var_directory(), address)
> else:
> return None
Sure thing. That's pretty much what I'm doing locally, I skipped the
True/False options here as the logic for that felt a little convoluted.
Peter W