On 2017-08-10 10:24, Tomas Krizek wrote:
> I like the idea of specifying types and it can also be helpful when
> reading the code, because it serves as additional documentation. For
> this reason, I also think it's important not to use stub files.
> The Python 3.6 syntax looks awesome and I'd like to use it. However,
> since we have to support Python 2, we'd have to use the comments. I
> don't really like that, because it's not a part of the in-line code.
> There's also a big downside -- you can't use partial annotations with
> comments.

I'm sorry for being the bringer of bad news. Although the Python 3
syntax (supported since Python 3.0!) looks awesome, you don't want to
use them in FreeIPA. Trust me. :)

Type annotation have a negative impact on both memory consumption and
import time. After all you end up with thousands of additional Python
objects in memory. The objects have to be constructed, validated and
attached to __annotations__ attribute.


Christian Heimes
Senior Software Engineer, Identity Management and Platform Security

Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Michael Cunningham, Michael
O'Neill, Eric Shander

Attachment: signature.asc
Description: OpenPGP digital signature

FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to