Re: [Python-Dev] #Python3 ! ? (was Python Library Support in 3.x)
I'm sorry if you had the impression people wanted to nail you at the stake for using Python 3. If that's how you felt, it isn't true. I basically agree with Glyph. I don't think we've recently (I'm not omnipresent) told anyone who had any good reasons to to stop using Python 3. If someone's doing work that actually needs Python 3 (most recent example a GSOC student porting Sphinx), we try our best to help, and AFAICT we've mostly been successful. (Please correct me if you think this is erroneous.). We don't get too many people that actually want or need that, but I'm guessing that's mostly because people porting libraries to py3k usually already know what they're doing so they don't need the first-line-of-defense thing for Python questions that #python tries to be.
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. 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? Nobody need change their opinions or adovacy as a result, but it would have the benefit of presenting #python in a more neutral and inclusive light. 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.
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. 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.
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. Regards, Nick -- Dr Nick Efford, School of | E: N.D.Efford@leeds.ac.uk Computing, University of | T: +44 113 343 6809 Leeds, Leeds, LS2 9JT, UK | W: http://www.comp.leeds.ac.uk/nde/ --------------------------+----------------------------------------- PGP fingerprint: 6ADF 16C2 4E2D 320B F537 8F3C 402D 1C78 A668 8492
On Sun, Jun 20, 2010 at 11:08 PM, Nick Efford <N.D.Efford@leeds.ac.uk> wrote:
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).
That's actually one of the better write-ups I've seen regarding several of the key benefits of the Python 3 transition. They're easy to lose sight of when discussing the topic with the existing developers that are bearing the cost of converting their code due to changes that were made primarily for the benefit of new users. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
On Sun, Jun 20, 2010 at 3:08 PM, Nick Efford <N.D.Efford@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
Laurens Van Houtven writes:
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.
I think that the most experienced people have absurdly high standards for "support" compared to those new to programming. I hope they check their advice against the real requirements of the new programmer.
Usually it's because they want to do something that people have already solved,
If they're new to programming, they're already in adventure mode. Why not point out the Road Less Traveled? That will make all the difference. Of course you should point out that it's going to be bumpier, and of course that is likely to push the majority of practical folks back to Python 2. But some of them are likely to be willing to endure a bit of frustration, especially if they're told that their bug reports will be listened to seriously on python-dev (given help from an experienced hand in formatting them!)
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?
Exactly. Don't give them rose-colored glasses about porting, and warn that some are just plain broken (eg, because of inappropriate assumptions about bytes vs Unicode). But on the other hand, some will mostly work for them, and their bug reports on the corner cases will be helpful.
I don't think it's a good idea to start encouraging NIH in new programmers :-)
Agreed.
On Sun, Jun 20, 2010 at 7:42 PM, Stephen J. Turnbull <stephen@xemacs.org> wrote:
Laurens Van Houtven writes: > 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.
I think that the most experienced people have absurdly high standards for "support" compared to those new to programming. I hope they check their advice against the real requirements of the new programmer.
Maybe. I'm not very sure about this: for example quite a few parts in Twisted are pretty hazy voodoo magic to me ;-) I actually recommend the high standards stuff to newbies specifically because it's high standards. If I meet some bug, I can probably work around it, but I imagine that it'd be much more frustrating for a newbie to come into contact with a bunch of stuff that really isn't very well polished or supported? I could be wrong.
> Usually it's because they want to do something that people have > already solved,
If they're new to programming, they're already in adventure mode. Why not point out the Road Less Traveled? That will make all the difference. Of course you should point out that it's going to be bumpier, and of course that is likely to push the majority of practical folks back to Python 2.
Three big reasons I can think of: because it doesn't always exist, because even if it does exist we don't always know about it, and because people actually helping people in #python would be far less adept at helping people with it :-) We have a bunch of people that end up doing their own thing anyway now, that just means we can't be as helpful later when they have more questions.
But some of them are likely to be willing to endure a bit of frustration, especially if they're told that their bug reports will be listened to seriously on python-dev (given help from an experienced hand in formatting them!)
Maybe that would help, yeah. We have a bunch of people now that start and then give up. They don't port, because they can't be bothered. They just start from scratch.
> 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?
Exactly. Don't give them rose-colored glasses about porting, and warn that some are just plain broken (eg, because of inappropriate assumptions about bytes vs Unicode). But on the other hand, some will mostly work for them, and their bug reports on the corner cases will be helpful.
I think that's usually more effort than new programmers are willing to put in, people tend to underestimate the cost of developing something from scratch in my experience. But sure, we all agree it's a good idea, so let's put it in the official thing about 2.x vs 3.x :)
> I don't think it's a good idea to start encouraging NIH in new > programmers :-)
Agreed.
I think we're kind of getting into the territory of personal preferences here. Thanks for your input, Laurens
participants (4)
-
Laurens Van Houtven -
Nick Coghlan -
Nick Efford -
Stephen J. Turnbull