[Freeipa-devel] [PATCH 0029-0046] Internationalized domain names in DNS plugin

Alexander Bokovoy abokovoy at redhat.com
Tue Apr 8 08:01:03 UTC 2014

On Tue, 08 Apr 2014, Petr Spacek wrote:
>On 8.4.2014 09:22, Jan Cholasta wrote:
>>On 4.4.2014 12:59, Petr Spacek wrote:
>>>On 3.4.2014 15:35, Jan Cholasta wrote:
>>>>I would shorten "origin_sign" to just "sign".
>>>Sign of what? Decay? :-) I don't think that sign is descriptive enough,
>>>I would personally stick with origin_sign.
>>Whoops, I meant "origin". The "_sign" bit seems a little bit redundant to me.
>"Origin" is an established term for the name of the parent.
>name = "blabla.example."
>origin of "name" = "example."
>Anyway, I still think that DNSName('@') is better than any constant 
>with cryptic name.
>Honza, can you see any problem with this? I know this creates 
>instance again and again, but is it a real problem? I would like to 
>avoid premature optimization... :-)
What about making all these fixed names as constants and then simply return those?

class DNSName:
     DNS_ORIGIN = DNSName('@')

     @staticmethod ...
     def ...
         return DNS_ORIGIN

they would be singletons...
/ Alexander Bokovoy

More information about the Freeipa-devel mailing list