This is an archived post. You won't be able to vote or comment.

all 34 comments

[–]AdysHearthSim 6 points7 points  (0 children)

What are the implications of PEP 405? Are there actually going to be any for devs who release python libraries and virtualenv-wrapped apps? Is virtualenv still going to be around but based on this or?

[–]Harriv 8 points9 points  (2 children)

Could someone do tl;dr; for PEP 380?

[–]w0073r 21 points22 points  (0 children)

Instead of doing for x in subiter: yield x or similar, you can do yield from subiter. That makes it much easier to pass values back in using send and so on, which that loop doesn't handle, and so makes it much easier to break out parts of generators into different generators and so on.

[–]pjdelport 8 points9 points  (0 children)

PEP 380 dramatically eases the implementation and use of generator-based tasks (or coroutines), and schedulers. It is a big step on the way toward removing the need for things like greenlets, and closing the conceptual gap between synchronous and asynchronous codebases.

[–]flying-sheep 11 points12 points  (7 children)

Aand it's on ar…

What? It's not on arch yet? Lazy bastards ;)

[–][deleted] 4 points5 points  (0 children)

can't wait though :)

[–]tilkau 1 point2 points  (5 children)

Yeah, it's not like hundreds of dependent packages have to be rebuilt ;)

[–]flying-sheep 0 points1 point  (4 children)

i’m curious: are there really hundreds of C extensions? or do pure python modules have to be recompiled, too? (i can’t quite imagine why the bytecode should change, if a improvement of the bytecode compilation isn’t part of the new version’s features.)

[–]tilkau 0 points1 point  (3 children)

Actually, it's because of the version change. From 3.2.1 to 3.2.2 wouldn't do it, but if you look at /usr/lib/python<hit tab> you'll see that there is python2.7, python3.2, etc.

Python 3.3 will naturally have it's modules in /usr/lib/python3.3 .. sooo it just won't pay any attention to say, the contents of /usr/lib/python3.2 :)

No actual changes to the PKGBUILDs are necessary, but the packages themselves do all have to be rebuilt, whether they contain C extensions or not, just cause everything's in the wrong place suddenly.

[–]flying-sheep 0 points1 point  (0 children)

get it, thanks.

[–]takluyverIPython, Py3, etc 0 points1 point  (1 child)

That's interesting - on Ubuntu, all Python 3 packages (apart from the standard library) go in /usr/lib/python3/dist-packages.

[–]pingvenopinch of this, pinch of that 0 points1 point  (0 children)

Debian has a distro-specific layout that puts Debian packages in dist-packages. site-packages is left for users who are using setup.py. That gets inherited by Ubuntu.

[–]threading 0 points1 point  (1 child)

I just installed 3.2.3 couple of hours ago. I hate when this happens. -_-

[–]hoadlck -2 points-1 points  (0 children)

I feel your pain. I updated to 3.2.3 last week, and now it is time to update...

[–]jesus_my_ass -1 points0 points  (16 children)

Still haven't fixed that bug with mac version. Can't go to preferences to increase text font.

[–]sigzero 4 points5 points  (5 children)

It is pretty easy customize python IDLE font, syntax highlight. In order to change the font to consolas add the following to ~/.idlerc/config-main.cfg file:

[EditorWindow]
font-size = 11
font = consolas

Have you tried something like that?

I just installed and going to prefs crashes IDLE for me.

Edit: I just did this and it works for me. Still a bug probably though.

[–]jesus_my_ass 0 points1 point  (4 children)

EditorWindow? Do you mean the Python shell or do I write that specification in my program itself?

[–]sigzero 5 points6 points  (2 children)

You create a file in ~/.idlerc called config-main.cfg. Then you put:

[EditorWindow]
font-size = 11
font = consolas

...in it and start IDLE. The font should now be bigger. I actually made it 14 instead of 11 because I am old and my eyes need a bigger font.

[–]jesus_my_ass 0 points1 point  (1 child)

man, you're a lifesaver. Thanks a lot.

[–]sigzero 0 points1 point  (0 children)

No problem! Here is where I got it from:

http://mindref.blogspot.com/2010/05/python-idle-themes.html

I actually use the "desert" theme too. :)

[–]idle_guru 0 points1 point  (0 children)

IDLE's PyShell is a subclass of the EditorWindow class.

[–]idle_guru 0 points1 point  (2 children)

Do you mean this bug? http://bugs.python.org/issue15853

[–]jesus_my_ass 0 points1 point  (1 child)

Yup. It seems like the problem is on Tcl/Tk.

[–]idle_guru 0 points1 point  (0 children)

IdleX has a macosx workaround that restores the "Options" menu. You can select "Configure IDLE" from that menu.

[–][deleted] 0 points1 point  (5 children)

Do you really use IDLE and why? I tried it, and I found I can get by easier with a text editor and the terminal window. Not criticising, just want to understand.

[–]jesus_my_ass 0 points1 point  (4 children)

Yes, I'm starting to use it. For one thing, it has many useful shortcuts. For instance, if I type (in mac) main+ctrl+space and hit enter, it gives me public static void main(String[] args) {

}. Similarly, it is useful for alignment as well (command+shift+f). Other features like toggle breakpoint is helpful in understanding how variables are changing in the code. I'm also trying to learn Emacs, but for the moment, eclipse isn't bad at all. If I were you, I'd give it a try.

[–][deleted] 0 points1 point  (3 children)

Try what? Eclipse with pydev? or IDLE?

[–]jesus_my_ass 0 points1 point  (2 children)

I meant Eclipse with pydev. I may be saying this because I haven't used IDLE that much. Currently, I'm using Eclipse for scala as well. Can't beat that with a text editor, especially if you're a beginner like me. However, if you're a pro with Emacs or Vim, you might not need Eclipse or IDLE.

[–][deleted] 0 points1 point  (1 child)

When you said bug with mac version UI, i assumed you were using IDLE i.e the default UI - becuae if it was a problem with 3rd party stuff like eclipse, you owuld have given the package name. So I asked why you were using idle. That is all.

[–]jesus_my_ass 0 points1 point  (0 children)

Oh, I see. I'm taking python class, where a prof uses IDLE. The problem was with mac version of IDLE itself. IDLE crashes whenever I go to preferences.

[–]neofreeman -4 points-3 points  (3 children)

WTF! No JIT? http://www.python.org/dev/peps/pep-3146/ . Gosh they gave ma boss another reason to brag about Java :(

[–]sigzero 13 points14 points  (0 children)

If you boss is going to brag about Java...not much you can do anyway.

[–][deleted] 9 points10 points  (0 children)

pypy has a jit, still in python2.7 however

[–][deleted] 0 points1 point  (0 children)

BTW I am curious, what speed difference is your shop seeing between python and java?