Nick Coghlan schrieb: > Martin v. Löwis wrote: >> I personally consider it "good style" to rely on implementation details >> of CPython; > > Is there a 'do not' missing somewhere in there?
No - I really mean it. I can find nothing wrong with people relying on reference counting to close files, for example. It's a property of CPython, and not guaranteed in other Python implementations - yet it works in a well-defined way in CPython. Code that relies on that feature is not portable, but portability is only one goal in software development, and may be irrelevant for some projects. Likewise, I see nothing wrong with people relying on .append on a list working "correctly" when used from two threads, even though the language specification does not guarantee that property. Similarly, it's fine when people rely on the C type "int" to have 32-bits when used with gcc on x86 Linux. The C standard makes that implementation-defined, but this specific implementation made a choice that you can rely on. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com