Re: tabs/spaces

2012-03-30 Thread Ulrich Eckhardt
Am 29.03.2012 17:25, schrieb Terry Reedy: I am using Thunderbird, win64, as news client for gmane. The post looked fine as originally received. The indents only disappeared when I hit reply and the >s were added. I can confirm this misbehaviour of Thunderbird (version 11.0 here), it strips the

Re: Python is readable

2012-03-30 Thread Steven D'Aprano
On Fri, 30 Mar 2012 00:38:26 -0400, Nathan Rice wrote: He did no such thing. I challenge you to find me one place where Joel has *ever* claimed that "the very notion of abstraction" is meaningless or without use. >> [snip quote] >>> To me, this directly indicates he views higher ord

Pipelining in Python

2012-03-30 Thread Kiuhnm
I decided to withdraw my proposal for streaming programming :) and to fall back to something more conventional. Here's the full story: The new operators are '>>' which does the pipelining and '-' which links f

Re: errors building python 2.7.3

2012-03-30 Thread Alexey Luchko
On 29.03.2012 21:29, David Robinow wrote: Have you included the patch to Include/py_curses.h ? If you don't know what that is, download the cygwin src package for Python-2.6 and look at the patches. Not all of them are still Thanks for the hint. With cygwin's 2.6.5-ncurses-abi6.patch it wor

Re: tabs/spaces

2012-03-30 Thread Dave Angel
On 03/30/2012 03:05 AM, Ulrich Eckhardt wrote: Am 29.03.2012 17:25, schrieb Terry Reedy: I am using Thunderbird, win64, as news client for gmane. The post looked fine as originally received. The indents only disappeared when I hit reply and the >s were added. I can confirm this misbehaviour of

Re: Python is readable

2012-03-30 Thread Nathan Rice
>> Mathematics is all about abstraction.  There are theories and structures >> in mathematics that have probably gone over a hundred years before being >> applied.  As an analogy, just because a spear isn't useful while farming >> doesn't mean it won't save your life when you venture into the woods

ANN: A new version (0.2.9) of the Python module which wraps GnuPG has been released.

2012-03-30 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been released. What Changed? = This is a minor bug-fix release. See the project website ( http://code.google.com/p/python-gnupg/ ) for more information. Summary: Better support for status messages from GnuPG. A random data file

Re: Python is readable

2012-03-30 Thread Chris Angelico
On Sat, Mar 31, 2012 at 12:46 AM, Nathan Rice wrote: > I believe in the idea of "things should be as simple as possible, but > not simpler".  Programming as it currently exists is absolutely > convoluted.  I am called on to help people learn to program from time > to time, and I can tell you that

RE: Python is readable

2012-03-30 Thread Prasad, Ramit
> > My aunt makes the best damn lasagna you've ever tasted without any > > overarching abstract theory of human taste. And if you think that > quantum > > mechanics is more difficult than understanding human perceptions of > > taste, you are badly mistaken. > > Taste is subjective, and your aunt p

Re: "convert" string to bytes without changing data (encoding)

2012-03-30 Thread Michael Ströder
Steven D'Aprano wrote: > On Thu, 29 Mar 2012 17:36:34 +, Prasad, Ramit wrote: > Technically, ASCII goes up to 256 but they are not A-z letters. >>> Technically, ASCII is 7-bit, so it goes up to 127. >> >>> No, ASCII only defines 0-127. Values >=128 are not ASCII. >>> >>> >From https

Re: Python is readable

2012-03-30 Thread Nathan Rice
On Fri, Mar 30, 2012 at 12:20 PM, Chris Angelico wrote: > On Sat, Mar 31, 2012 at 12:46 AM, Nathan Rice > wrote: >> I believe in the idea of "things should be as simple as possible, but >> not simpler".  Programming as it currently exists is absolutely >> convoluted.  I am called on to help peopl

Re: Python is readable

2012-03-30 Thread Chris Angelico
On Sat, Mar 31, 2012 at 5:15 AM, Nathan Rice wrote: > It is true that program complexity is correlated with problem > complexity, language and environment complexity is undeniable.  If you > want to prove this to yourself, find someone who is intelligent and > has some basic level of computer lite

Re: unittest: assertRaises() with an instance instead of a type

2012-03-30 Thread Ethan Furman
Steven D'Aprano wrote: To the degree that the decision of how finely to slice tests is a matter of personal judgement and/or taste, I was wrong to say "that is not the right way". I should have said "that is not how I would do that test". I believe that a single test is too coarse, and three o

Re: "convert" string to bytes without changing data (encoding)

2012-03-30 Thread Serhiy Storchaka
28.03.12 21:13, Heiko Wundram написав(ла): Reading from stdin/a file gets you bytes, and not a string, because Python cannot automagically guess what format the input is in. In Python3 reading from stdin gets you string. Use sys.stdin.buffer.raw for access to byte stream. And reading from file

Re: "convert" string to bytes without changing data (encoding)

2012-03-30 Thread Chris Angelico
On Sat, Mar 31, 2012 at 6:06 AM, Serhiy Storchaka wrote: > 28.03.12 21:13, Heiko Wundram написав(ла): > >> Reading from stdin/a file gets you bytes, and >> not a string, because Python cannot automagically guess what format the >> input is in. > > > In Python3 reading from stdin gets you string. U

Re: Python is readable

2012-03-30 Thread Nathan Rice
> This is more a matter of being unable to express themselves > appropriately. If I allowed them to write an exact process of steps to > do what's required, those steps would either be grossly insufficient > for the task, or would BE pseudo-code. There are plenty of people who > cannot write those

Re: Python is readable

2012-03-30 Thread Chris Angelico
On Sat, Mar 31, 2012 at 6:55 AM, Nathan Rice wrote: > I think you'd find that these "non coders" would do very well if given > the ability to provide instructions in a natural, interactive way. > They are not failing us, we are failing them. The nearest thing to natural-language command of a comp

Re: Python is readable

2012-03-30 Thread Neil Cerutti
On 2012-03-30, Nathan Rice wrote: > Restricted natural languages are an active area of current > research, and they clearly demonstrate that you can have an > expressive formal language that is also valid English. See, for example, Inform 7, which translates a subset of English into Inform 6 code

Re: Python is readable

2012-03-30 Thread Dan Sommers
On Sat, 31 Mar 2012 07:20:39 +1100 Chris Angelico wrote: > ... That's why we're all still programming in assembly language and > doing our own memory management, because we would lose a lot of > personal value if programming stopped being so difficult. If it > weren't for all these silly new-fang

Re: Python is readable

2012-03-30 Thread Nathan Rice
On Fri, Mar 30, 2012 at 4:20 PM, Chris Angelico wrote: > On Sat, Mar 31, 2012 at 6:55 AM, Nathan Rice > wrote: >> I think you'd find that these "non coders" would do very well if given >> the ability to provide instructions in a natural, interactive way. >> They are not failing us, we are failing

Will MySQL ever be supported for Python 3.x?

2012-03-30 Thread John Nagle
The MySQLdb entry on SourceForge (http://sourceforge.net/projects/mysql-python/) web site still says the last supported version of Python is 2.6. PyPi says the last supported version is Python 2.5. The last download is from 2007. I realize there are unsupported fourth-party versions from

Re: Will MySQL ever be supported for Python 3.x?

2012-03-30 Thread Irmen de Jong
On 30-3-2012 23:20, John Nagle wrote: > The MySQLdb entry on SourceForge > (http://sourceforge.net/projects/mysql-python/) > web site still says the last supported version of Python is 2.6. > PyPi says the last supported version is Python 2.5. The > last download is from 2007. > > I reali

Re: Python is readable

2012-03-30 Thread Chris Angelico
On Sat, Mar 31, 2012 at 7:58 AM, Nathan Rice wrote: > Programming > language designers purposefully try to make their language C-like, > because not being C-like disqualifies a language from consideration > for a HUGE portion of programmers, who cower at the naked feeling they > get imagining a wo

Re: Will MySQL ever be supported for Python 3.x?

2012-03-30 Thread John Nagle
On 3/30/2012 2:32 PM, Irmen de Jong wrote: Try Oursql instead http://packages.python.org/oursql/ "oursql is a new set of MySQL bindings for python 2.4+, including python 3.x" Not even close to being compatible with existing code. Every SQL statement has to be rewritten, with the parameter

Re: Advise of programming one of my first programs

2012-03-30 Thread Anatoli Hristov
> > ** > > Absolutely! Too bad your version would be considered the more > “complicated” version ;) > I`m sure about that, but I`am also sure that every beginner passed true that way. > > > ** ** > > >With the main navigation menu I will only have the option to select a > nickname and when a

Re: Will MySQL ever be supported for Python 3.x?

2012-03-30 Thread Irmen de Jong
On 30-3-2012 23:46, John Nagle wrote: > On 3/30/2012 2:32 PM, Irmen de Jong wrote: >> Try Oursql instead http://packages.python.org/oursql/ >> "oursql is a new set of MySQL bindings for python 2.4+, including python 3.x" > >Not even close to being compatible with existing code. Every SQL >

Re: Python is readable

2012-03-30 Thread Nathan Rice
On Fri, Mar 30, 2012 at 5:45 PM, Chris Angelico wrote: > On Sat, Mar 31, 2012 at 7:58 AM, Nathan Rice > wrote: >> Programming >> language designers purposefully try to make their language C-like, >> because not being C-like disqualifies a language from consideration >> for a HUGE portion of progr

Threads on google groups not on gmane?

2012-03-30 Thread Mark Lawrence
I went onto google groups to do a search and saw three threads (there may be more) that I've never seen on gmane, which I read via thunderbird on windows. The titles are "Is programming art or science", "breezypythongui: A New Toolkit for Easy GUIs in Python" and "weird behaviour: pygame plays

Re: CFG for python

2012-03-30 Thread Mark Lawrence
On 29/03/2012 06:44, J. Mwebaze wrote: Anyone knows how to create control-flow-graph for python.. After searching around, i found this article, http://www.python.org/dev/peps/pep-0339/#ast-to-cfg-to-bytecode and also a reference to http://doc.pypy.org/en/latest/objspace.html#the-flow-model How

Re: help needed to understand an error message.

2012-03-30 Thread J. Cliff Dyer
So the problem is that python doesn't know what you're trying to do. It doesn't know that you meant to say "print." When the parser is looking at the word Print, it assumes you are referencing an object named Print, which is completely legal. It's only once you've created the next token, a strin

Re: Python is readable

2012-03-30 Thread Terry Reedy
On 3/30/2012 6:47 AM, Steven D'Aprano wrote: Spolsky has written at least three times about Architecture Astronauts, and made it abundantly clear that the problem with them is that they don't solve problems, they invent overarching abstractions that don't do anything useful or important, and hyp

Re: Tools for refactoring/obfuscation

2012-03-30 Thread Lie Ryan
On 03/29/2012 03:04 AM, Javier wrote: Yes, in general I follow clear guidelines for writing code. I just use modules with functions in the same directory and clear use of name spaces. I almost never use classes. I wonder if you use some tool for refactoring. I am mainly intersted in scripting

Re: Python is readable

2012-03-30 Thread Lie Ryan
On 03/18/2012 12:36 PM, Steven D'Aprano wrote: On Sat, 17 Mar 2012 20:59:34 +0100, Kiuhnm wrote: In the second example, most English speakers would intuit that "print(i)" prints i, whatever i is. There are two points where the code may be misunderstood, a beginner may think that "print i" prin

Re: Python is readable

2012-03-30 Thread Lie Ryan
On 03/21/2012 03:55 AM, Nathan Rice wrote: In mathematics, when you perform global optimization you must be willing to make moves in the solution space that may result in a temporary reduction of your optimality condition. If you just perform naive gradient decent, only looking to the change tha

string interpolation for python

2012-03-30 Thread Yingjie Lan
Hi all,  I'd really like to share this idea of string interpolation for formatting. Let's start with some code: >>> name = "Shrek" >>> print( "Hi, $name$!") Hi, Shrek! >>> balls = 30 >>> print( "We have $balls$ balls.") We have 30 balls >>> persons = 5 >>> print ("And $persons$ persons.") And 5

Re: Python is readable

2012-03-30 Thread Lie Ryan
On 03/21/2012 01:44 PM, Steve Howell wrote: Also, don't they call those thingies "object" for a reason? ;) A subject is (almost?) always a noun, and so a subject is also an object. -- http://mail.python.org/mailman/listinfo/python-list