Re: Python 2 to 3 conversion - embrace the pain

2015-03-17 Thread John Nagle
On 3/15/2015 4:43 PM, Roy Smith wrote: > In article , > Mario Figueiredo wrote: > >> What makes you think your anecdotal bugs constitute any sort of >> evidence this programming language isn't ready to be used by the >> public? > > There's several levels of "ready". > > I'm sure the core langu

Re: UnboundLocalError in TKinter, SQLAlchemy script.

2015-03-17 Thread MRAB
On 2015-03-18 02:41, Chris Kavanagh wrote: I have a simple script that takes user input (for an Employee) such as name, age, etc then puts in an sqlite3 database. The script worked fine until I realized one problem. The age input field is defined in SQLAlchemy as an Integer, so if a user inputs a

Re: Brilliant or insane code?

2015-03-17 Thread Dan Sommers
On Wed, 18 Mar 2015 13:25:45 +1100, Steven D'Aprano wrote: > On Wednesday 18 March 2015 12:14, Dan Sommers wrote: >> According to the article itself, "it relies in an implementation >> detail (the order the zip function iterates over the arrays) to >> work." Then again, the article also points t

UnboundLocalError in TKinter, SQLAlchemy script.

2015-03-17 Thread Chris Kavanagh
I have a simple script that takes user input (for an Employee) such as name, age, etc then puts in an sqlite3 database. The script worked fine until I realized one problem. The age input field is defined in SQLAlchemy as an Integer, so if a user inputs a string instead of a number in that field, an

Re: Brilliant or insane code?

2015-03-17 Thread Steven D'Aprano
On Wednesday 18 March 2015 12:14, Dan Sommers wrote: > On Wed, 18 Mar 2015 00:35:42 +, Mark Lawrence wrote: > >> I've just come across this >> http://www.stavros.io/posts/brilliant-or-insane-code/ as a result of >> this http://bugs.python.org/issue23695 >> >> Any and all opinions welcomed, I

Re: Brilliant or insane code?

2015-03-17 Thread Oscar Benjamin
On 18 March 2015 at 00:35, Mark Lawrence wrote: > I've just come across this > http://www.stavros.io/posts/brilliant-or-insane-code/ as a result of this > http://bugs.python.org/issue23695 > > Any and all opinions welcomed, I'm chickening out and sitting firmly on the > fence. It seems fine to me

Re: Brilliant or insane code?

2015-03-17 Thread Dan Sommers
On Wed, 18 Mar 2015 00:35:42 +, Mark Lawrence wrote: > I've just come across this > http://www.stavros.io/posts/brilliant-or-insane-code/ as a result of > this http://bugs.python.org/issue23695 > > Any and all opinions welcomed, I'm chickening out and sitting firmly > on the fence. According

Re: Brilliant or insane code?

2015-03-17 Thread Chris Angelico
On Wed, Mar 18, 2015 at 11:35 AM, Mark Lawrence wrote: > I've just come across this > http://www.stavros.io/posts/brilliant-or-insane-code/ as a result of this > http://bugs.python.org/issue23695 > > Any and all opinions welcomed, I'm chickening out and sitting firmly on the > fence. """I don’t r

Re: Auto-completion of Unicode names [was why not module name?]

2015-03-17 Thread Dan Sommers
On Wed, 18 Mar 2015 10:29:53 +1100, Steven D'Aprano wrote: > Speaking of tab completion, would anyone be interested in being able > to auto-complete \N{...} unicode character names? I'm considering that > as an enhancement to my tabhistory module. Only if it's fuzzy. One use case is that "openin

Re: Python 2 to 3 conversion - embrace the pain

2015-03-17 Thread Mario Figueiredo
On Tue, 17 Mar 2015 04:36:01 +, Mark Lawrence wrote: > >Of course we could avoid all of these problems if we were to bring back >the mainframe or mini and the dumb terminal. > >Take cover, incoming :) No kidding. Installing only the software you coded (or from source) may be a little too mu

Brilliant or insane code?

2015-03-17 Thread Mark Lawrence
I've just come across this http://www.stavros.io/posts/brilliant-or-insane-code/ as a result of this http://bugs.python.org/issue23695 Any and all opinions welcomed, I'm chickening out and sitting firmly on the fence. -- My fellow Pythonistas, ask not what our language can do for you, ask wh

Re: Auto-completion of Unicode names [was why not module name?]

2015-03-17 Thread Chris Angelico
On Wed, Mar 18, 2015 at 10:29 AM, Steven D'Aprano wrote: > Speaking of tab completion, would anyone be interested in being able to > auto-complete \N{...} unicode character names? I'm considering that as an > enhancement to my tabhistory module. > > Python supports \N{...} backslash escapes in Uni

Auto-completion of Unicode names [was why not module name?]

2015-03-17 Thread Steven D'Aprano
Speaking of tab completion, would anyone be interested in being able to auto-complete \N{...} unicode character names? I'm considering that as an enhancement to my tabhistory module. Python supports \N{...} backslash escapes in Unicode strings, so we can write things like: py> print(u"\N{CYRILLIC

Re: Python+Glade+Gtk tutorial?

2015-03-17 Thread Michael Torrie
On 03/16/2015 10:13 AM, Dave Farrance wrote: > So am I understanding this correctly: If I use this include line: > > "from gi.repository import Gtk, Gdk, GObject, Pango" etc... > > ... I get, in effect, the libraries used in Gnome-3 even with python2? > Whatever "gi.repository" is? It's a bit h

Re: Auto-completion: why not module name?

2015-03-17 Thread Steven D'Aprano
On Tue, 17 Mar 2015 11:22 pm, Oscar Benjamin wrote: > On 17 March 2015 at 08:10, Steven D'Aprano > wrote: >> On Tuesday 17 March 2015 03:23, candide wrote: >> >> You might like my tab completion and command history module: >> >> http://code.google.com/p/tabhistory/ >> >> I've been using it on Lin

Re: Python 2 to 3 conversion - embrace the pain

2015-03-17 Thread Mark Lawrence
On 17/03/2015 22:36, Dennis Lee Bieber wrote: On Tue, 17 Mar 2015 14:50:57 + (UTC), Grant Edwards declaimed the following: On 2015-03-17, Mark Lawrence wrote: Of course we could avoid all of these problems if we were to bring back the mainframe or mini and the dumb terminal. We did, e

Re: Python 2 to 3 conversion - embrace the pain

2015-03-17 Thread Cameron Simpson
On 17Mar2015 05:30, Mario Figueiredo wrote: On Tue, 17 Mar 2015 14:42:42 +1100, Ben Finney wrote: Mario Figueiredo writes: On Tue, 17 Mar 2015 09:02:38 +1100, Chris Angelico wrote: >Imagine you need a PostgreSQL database for your Python application - >which also means you need psycopg2, of

Re: Python+Glade+Gtk tutorial?

2015-03-17 Thread Dave Farrance
Jason Heeris wrote: >In terms of toolkit bindings, (a) I prefer GTK, but (b) it's impossible to >tell what the greater proportion of people using one vs. the other is. Or >if they're wise to do so. Are there more Google hits/SO questions because >it's harder to use? Or because everyone loves to u

Re: Odd ValueError using float

2015-03-17 Thread emile
On 03/15/2015 07:01 AM, Peter Otten wrote: Probably not helpful, but I can provoke the behaviour you see by toggling bytes with ctypes, thus simulating a corrupted str object: Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for

EuroPython 2015: Call for Proposals

2015-03-17 Thread M.-A. Lemburg
We’re looking for proposals on every aspect of Python: programming from novice to advanced levels, applications and frameworks, or how you have been involved in introducing Python into your organization. EuroPython is a community conference and we are eager to hear about your experience. Please al

V ECCOMAS Thematic Conference VipIMAGE 2015: SUBMISSION EXTENDED

2015-03-17 Thread tava...@fe.up.pt
Dear Colleague, We are pleased to inform you that the submission of abstracts for the International Conference VipIMAGE 2015 - V ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING (www.fe.up.pt/vipimage) to be held in October 19-21, 2015, in H10 Costa Adeje Palace,

Re: anaconda bug?

2015-03-17 Thread memilanuk
On 03/17/2015 09:51 AM, George Trojan wrote: On 03/16/2015 11:47 PM, memilanuk wrote: Might be just you... monte@machin-shin:~$ python Python 3.4.3 |Continuum Analytics, Inc.| (default, Mar 6 2015, 12:03:53) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or

Re: Dict comprehensions - improvement to docs?

2015-03-17 Thread Ian Kelly
On Tue, Mar 17, 2015 at 12:44 AM, Frank Millman wrote: > Thanks for the explanation. I'll try not to make that mistake again. > > However, to go back to the original example, we want to compare a dict > comprehension with a dict() constructor using a generator expression. > > Let's see if I have g

Re: Re: anaconda bug?

2015-03-17 Thread George Trojan
On 03/16/2015 11:47 PM, memilanuk wrote: Might be just you... monte@machin-shin:~$ python Python 3.4.3 |Continuum Analytics, Inc.| (default, Mar 6 2015, 12:03:53) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tk

Re: [OT] Weaknesses of distro package managers - was Re: Python 2 to 3 conversion - embrace the pain

2015-03-17 Thread Michael Torrie
On 03/17/2015 02:39 AM, Steven D'Aprano wrote: > On Tuesday 17 March 2015 12:46, Michael Torrie wrote: > >> Python3 can be installed from Software Collections (and that is somewhat >> reasonable), but it won't integrate by default, so you can't use >> #!/usr/bin/python3 in your apps by default wit

Re: Python 2 to 3 conversion - embrace the pain

2015-03-17 Thread Grant Edwards
On 2015-03-17, Mark Lawrence wrote: > Of course we could avoid all of these problems if we were to bring back > the mainframe or mini and the dumb terminal. We did, except we made the terminal smarter and prettier and called it a "web browser" and we call the mainframe a "web server". -- Gran

Re: Python 2 to 3 conversion - embrace the pain

2015-03-17 Thread Mario Figueiredo
On Tue, 17 Mar 2015 22:26:58 +1100, Steven D'Aprano wrote: > >> >> Can you give an example? I wouldn't count things like gets, which >> aren't as much changes in the language, as recognition that using it was >> buggy from the start. > >That's exactly the point. `gets` is dangerous and needs to

Re: Dict comprehensions - improvement to docs?

2015-03-17 Thread Lele Gaifax
"Frank Millman" writes: > It seems that a dict comp is noticeably faster. > > Does this sound right, or are there other factors I should be taking into > account? The dict comp does not execute any function call. Consider the following: $ python3 -m timeit "d=dict()" 1000 loops, be

Re: Auto-completion: why not module name?

2015-03-17 Thread Oscar Benjamin
On 17 March 2015 at 08:10, Steven D'Aprano wrote: > On Tuesday 17 March 2015 03:23, candide wrote: > > You might like my tab completion and command history module: > > http://code.google.com/p/tabhistory/ > > I've been using it on Linux for about three or four years, and although I > don't promise

Re: Topic Modeling LDA Gensim

2015-03-17 Thread John Ladasky
Hey you two, get a room. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 to 3 conversion - embrace the pain

2015-03-17 Thread Steven D'Aprano
On Tue, 17 Mar 2015 09:36 am, Paul Rubin wrote: > Steven D'Aprano writes: [...] >> If we were designing Python from scratch today, here are some of the >> changes we would certainly make: [mostly good changes] > > I agree with most of those changes and I'd add some of my own that are > even more

Re: Topic Modeling LDA Gensim

2015-03-17 Thread Sreenath k
Hi, I don't know how to contact you by email, nor am I going to answer your question. I have a question for you. Please help if you can. On running the code from this page ( Unsupervised Learning ): http://nbviewer.ipython.org/gist/rjweiss/7158866# The output of 'lda[corpus[1]]' keeps changing

Re: [OT] Weaknesses of distro package managers - was Re: Python 2 to 3 conversion - embrace the pain

2015-03-17 Thread Steven D'Aprano
On Tuesday 17 March 2015 12:46, Michael Torrie wrote: > Python3 can be installed from Software Collections (and that is somewhat > reasonable), but it won't integrate by default, so you can't use > #!/usr/bin/python3 in your apps by default without altering the system > paths. If RedHat installs

Re: Python 2 to 3 conversion - embrace the pain

2015-03-17 Thread Steven D'Aprano
On Tuesday 17 March 2015 14:33, Michael Torrie wrote: > On 03/16/2015 09:04 PM, Mario Figueiredo wrote: >> Are you saying this is a problem for any developer? Especially >> considering this is a one-time operation... >> >> Or maybe you mean lazy developers. But lazy developers are an edge >> case

Re: Auto-completion: why not module name?

2015-03-17 Thread Steven D'Aprano
On Tuesday 17 March 2015 03:23, candide wrote: > Python 3.4 provides auto-completion facility within a Python console > embedded in a command line terminal. > > > But apparently this facility doesn't allow the user to complete with > standard module name. For instance, editing the following : >