[Python-Dev] #Python3 ! ? (was Python Library Support in 3.x)

Laurens Van Houtven lvh at laurensvh.be
Sun Jun 20 17:51:28 CEST 2010


On Sun, Jun 20, 2010 at 3:08 PM, Nick Efford <N.D.Efford at leeds.ac.uk> wrote:
> Thanks for explaining your position on this so carefully,
> Laurens.  You've made many reasonable points which I hope will
> help to cool things down a little.

Cool, glad it's appreciated.

> Clearly, there are situations where it makes sense to advocate
> Python 2.X and other situations where people can be encouraged to
> consider Python 3.  The issues that potential users need to
> consider are too subtle to be represented fairly by the simple
> advice to 'avoid Python 3', so can we not all agree to remove
> it as a #python topic as a gesture of goodwill?

I like the idea of changing it to something that points to a more
detailed thing as someone suggested above. Ideally short and
completely neutral, like "2.x or 3.x? http://shorturl/whatever".

> Nobody need change their opinions or adovacy as a result,

I very much doubt that'd happen anyway ;-)

> but it would have the benefit of presenting #python in a more
> neutral and inclusive light.

+1

> I've not used IRC much in the past, but if it would be useful for
> someone like myself - a longtime Python user but recent and
> enthusiastic Python 3 adopter - to offer my opinions and advice
> on the issue to newcomers then I'm certainly willing to get
> involved.

Everybody's very welcome, the entire reason I'm putting time into this
is because apparently some people felt less welcome than I'd like them
to feel :-)

>> We're still telling people to use Python 2.x by default because of a
>> few major things:
>>
>> 1. going out on a limb here: well over 90% of those people are
>> completely new to Python and out of those most of them completely new
>> to programming too,
>
> Not sure if I agree with you here; I regard people new to
> programming as the prime candidates for using Python 3.  Many of
> the language changes have the effect of making it significantly
> easier to learn for newcomers (I wrote about this a while ago -
> see http://www.comp.leeds.ac.uk/nde/papers/teachpy3.html).
> Also, people new to Python or programming in general won't have
> the burden of legacy code that needs to be converted.

Very nice read. Most points are indeed common questions, we just tell
people how to work around them in 2.x. ie, whenever someone posts
old-style classes, someone will always point out to them that they
really probably want new-style even if they don't get the difference
yet; for integer division we tell people to convert to float or from
__future__ import division, if you use print call it with exactly one
string and just build that string, never ever ever use input, just use
raw_input, that sort of stuff. Not always very clean, more of a
workaround. Also stuff like chevron print is actively discouraged in
favor of using a logging module or eg sys.stderr. Of course, in py3k
where you don't have to, which is even nicer :-)

I'm guessing it's okay to link to this from the newer, more neutral pages? :-)

> The only situation in which I'd direct someone new to programming
> away from Python 3 would be if they had a specific need to use a
> library that wasn't yet supported.

Yeah, I think the reason for that rule is that the majority of people
asking about new software actually start or end up in this category.
No statistics to back that up, but the regulars seem to agree (again,
maybe we're biased). See Steve Thorne (Jerub)'s post in a parallel
thread.

Usually it's because they want to do something that people have
already solved, and #python is pretty strict about discouraging
implementing software that already exists. Of course, as the porting
of Python 3.x packages progresses this point becomes more and more
moot. A possible solution is that we suggest that people, instead of
rolling their own thing from scratch, help to port an existing good
2.x lib to 3.x, or use 2.x? I don't think it's a good idea to start
encouraging NIH in new programmers :-)

>> 2. the nicest libraries for doing a lot of stuff aren't ported yet, or
>> are in the process of being ported but not yet recommended for actual
>> use by their authors, (this seems to be a point of contention?)
>
> This has certainly been the key issue for me.  Only in the past
> two or three months have we got to the point where I feel can commit
> to Python 3 fully.  Six months ago, I definitely could not have
> done so.  This is progress, and we need to be positive about it.

Yeah, that message has been in the /topic for _WAY_ longer than 6 months.

>
> Regards,
>
>
> Nick

Thank you very much for your input,
Laurens


More information about the Python-Dev mailing list