PyPy support breaking CPython compatibility?

Etienne Robillard tkadm30 at yandex.com
Wed Jan 31 04:15:25 EST 2018



Le 2018-01-30 à 16:38, Ned Batchelder a écrit :
>> I'm confused by this:
>>
>> -if os.environ.get('SCHEVO_OPTIMIZE', '1') == '1':
>> +if os.environ.get('SCHEVO_OPTIMIZE', '1') == True:
>>
> I was also curious about this: when does os.environ.get return 
> anything but a string? 

I was probably high when I coded this! ;)

I think a better solution is to write :

if os.environ.get('SCHEVO_OPTIMIZE', '0')  == '1':
  ...

Anyways, what do you think about the weakref case?

Etienne


-- 
Etienne Robillard
tkadm30 at yandex.com
https://www.isotopesoftware.ca/




More information about the Python-list mailing list