[Baypiggies] Is there any guide or post to follow in order to write code that works both on python 2 and 3?

Steve Piercy - Web Site Builder Web at StevePiercy.com
Mon Apr 21 22:18:12 CEST 2014


There was an excellent presentation at PyCon, too, with both a 
specific example for context and general guidance.  Video:
http://pyvideo.org/video/2626/by-your-bootstraps-porting-your-application-to-p

The book referenced at
http://python3porting.com/
was given out at PyCon, too, thanks to the PSF.

--steve


On 4/21/14 at 4:39 PM, santiago.basulto at gmail.com (Santiago 
Basulto) pronounced:

>Shaleh, really useful. Thank you!
>
>Guido, you remind me something. I'll use Tox of course. Thanks for your
>advice.
>
>BTW. I'm new to the baypiggies ML. I'm from Argentina. You're all really
>kind. This is one of the things that makes Python so awesome.
>
>
>On Mon, Apr 21, 2014 at 4:36 PM, Guido van Rossum <guido at python.org> wrote:
>
>>The commonly recommended resource is http://python3porting.com/
>>
>>Also make sure to get to 100% test coverage!
>>
>>
>>On Mon, Apr 21, 2014 at 12:31 PM, Santiago Basulto <
>>santiago.basulto at gmail.com> wrote:
>>
>>> Hello everyone. I'm writing a library that I'd like to be usable from
>>> both, Python 2 and Python 3. Actually, there's a library that works just
>>> for python2 and I want to make it work for 3.
>>>
>>> I know it's not really hard to make it work for both versions, but
>>> sometimes I have doubts. For example. If I define a simple class:
>>>
>>> class A:
>>>     def __init__(self):
>>>         pass
>>>
>>> It will have different meanings if it's run with Python 2 or Python 3
>>> (lacking 'object' inheritence for python2).
>>>
>>> Is there any guide, blog post, anything?
>>>
>>> Thank you very much.
>>>
>>> --
>>> Santiago Basulto.-
>>>
>>> _______________________________________________
>>> Baypiggies mailing list
>>> Baypiggies at python.org
>>> To change your subscription options or unsubscribe:
>>> https://mail.python.org/mailman/listinfo/baypiggies
>>>
>>
>>
>>
>>--
>>--Guido van Rossum (python.org/~guido)
>>
>
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
-- --
Steve Piercy               Web Site Builder               
Soquel, CA
<web at StevePiercy.com>                  <http://www.StevePiercy.com/>



More information about the Baypiggies mailing list