Pylint across Python versions

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Feb 10 14:03:36 CET 2014


On 10/02/2014 11:39, thomas.lehmann at adtech.com wrote:
> Hi,
>
> somebody who can tell me about pylint experiences across
> different Python version.
>
> Example:
> I'm using a construct like this:
>
> if sys.version.startswith("3."):
>      unicode = str
>
> The reason is that Python 3 does not have this
> function anymore but pylint yells for Python < 3
> about redefinition also it does not happen.

I've no idea what the above is saying but see below anyway.

>
> How to get forward with this?
>
> Regards,
> Thomas
>

 >>> import sys
 >>> sys.version
'3.4.0b2 (v3.4.0b2:ba32913eb13e, Jan  5 2014, 16:23:43) [MSC v.1600 32 
bit (Intel)]'
 >>> sys.version.startswith('3.')
True
 >>>

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com





More information about the Python-list mailing list