On 2013-05-28, Joel Goldstick <joel.goldst...@gmail.com> wrote:
>
> No

Yes. More below.

> On May 28, 2013 3:48 PM, "Carlos Nepomuceno" <carlosnepomuc...@outlook.com>
> wrote:
>> Are there Python 'preprocessor directives'?
>>
>> I'd like to have something like '#ifdef' to mix code from Python 2 and 3
>> in a single file.
>>
>> Is that possible? How?

You need sys.version_info.

For more, see http://python3porting.com/noconv.html

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to