Re: Py 3.3, unicode / upper()

2012-12-19 Thread Westley Martínez
On Wed, Dec 19, 2012 at 02:23:15PM -0700, Ian Kelly wrote: > On Wed, Dec 19, 2012 at 1:55 PM, wrote: > > If "wrong", this can be considered as programmatically correct > > or logically acceptable (Py3.2) > > > 'Straße'.upper().lower().capitalize() == 'Straße' > > True > > > > while this wil

Re: Py 3.3, unicode / upper()

2012-12-19 Thread Westley Martínez
On Wed, Dec 19, 2012 at 09:54:20PM -0500, Terry Reedy wrote: > On 12/19/2012 9:03 PM, Chris Angelico wrote: > >On Thu, Dec 20, 2012 at 5:27 AM, Ian Kelly wrote: > >> From what I've been able to discern, [jmf's] actual complaint about PEP > >>393 stems from misguided moral concerns. With PEP-393,

Re: pygnomevfs get_local_path_from_uri replacement

2012-12-22 Thread Westley Martínez
On Sat, Dec 22, 2012 at 09:57:11AM +0100, Daniel Fetchinson wrote: > Hi folks, I realize this is slightly off topic and maybe belongs to a > gnome email list but it's nevertheless python: > > I use an old python program that was written for gnome 2 and gtk 2 and > uses the function get_local_path_

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Westley Martínez
On Thu, Dec 27, 2012 at 12:01:16PM -0800, mogul wrote: > 'Aloha! > > I'm new to python, got 10-20 years perl and C experience, all gained on unix > alike machines hacking happily in vi, and later on in vim. > > Now it's python, and currently mainly on my kubuntu desktop. > > Do I really need a

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-03-01 Thread Westley Martínez
First of all: http://www.youtube.com/watch?v=z5jKMEB4hHE On Wed, Feb 29, 2012 at 12:09:16AM -0800, Xah Lee wrote: > Now, let me tell you what operator precedence is. First of all, let's > limit ourselfs to discuss operators that are so-called binary > operators, which, in our context, basically m

Re: Building Python with non-standard tcl/tk support

2012-03-03 Thread Westley Martínez
On Sat, Mar 03, 2012 at 05:36:52PM +, Steven D'Aprano wrote: > I'm trying to re-build Python 3.2 with support for TCL/TK 8.5, but when I > run "make" I get this message: > > Failed to build these modules: > _tkinter > > and after installing 3.2 I still have this: > > >>> import _tkinter > >

Re: Building Python with non-standard tcl/tk support

2012-03-03 Thread Westley Martínez
On Sun, Mar 04, 2012 at 12:50:53AM +, Steven D'Aprano wrote: > Okay, now I'm making progress... if I remove the previously existing > _tkinter in lib-dynload, and re-run "make", I get something new: > > building '_tkinter' extension > gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrap

Re: How do you use the widgets in tkinter.ttk if you want to "import tkinter as tk"?

2012-03-04 Thread Westley Martínez
On Sun, Mar 04, 2012 at 05:39:27PM -0800, Rick Johnson wrote: > On Mar 2, 11:06 pm, John Salerno wrote: > > I'm tempted just to go back to wxPython. Two sets of widgets in Tkinter is > > a little annoying. > > Your complaint is justified. The Tkinter API is a disgrace. IDLE's > source is just as

Re: are int, float, long, double, side-effects of computer engineering?

2012-03-05 Thread Westley Martínez
On Mon, Mar 05, 2012 at 05:11:09PM -0800, Xah Lee wrote: > some additional info i thought is relevant. > > are int, float, long, double, side-effects of computer engineering? > > Xah Lee wrote: > «… One easy way to measure it is whether a programer can read and > understand a program without havi

Re: are int, float, long, double, side-effects of computer engineering?

2012-03-06 Thread Westley Martínez
On Tue, Mar 06, 2012 at 04:29:10PM -0500, Calvin Kim wrote: > On 03/06/2012 01:34 AM, Xah Lee wrote: > >while what you said is true, but the problem is that 99.99% of > >programers do NOT know this. They do not know Mathematica. They've > >never seen a language with such feature. The concept is ali

Re: How to structure packages

2011-09-07 Thread Westley Martínez
First of all MyClass.py should be renamed to myclass.py. Module names should be lowercase. Secondly, put this in __init__.py: from .myclass import MyClass and there you go. On Wed, Sep 07, 2011 at 08:56:32AM -0700, bclark76 wrote: > I'm learning python, and was playing with structuring pac

Re: Python fails on math

2011-02-24 Thread Westley Martínez
On Fri, 2011-02-25 at 00:33 +, Steven D'Aprano wrote: > On Thu, 24 Feb 2011 10:40:45 -0600, Robert Kern wrote: > > > On 2/24/11 5:55 AM, Steven D'Aprano wrote: > >> On Wed, 23 Feb 2011 13:26:05 -0800, John Nagle wrote: > >> > >>> The IEEE 754 compliant FPU on most machines today, though, has a

Re: Python fails on math

2011-02-24 Thread Westley Martínez
On Fri, 2011-02-25 at 00:57 +, Grant Edwards wrote: > On 2011-02-25, Westley Mart?nez wrote: > > > Maybe I'm wrong, but wouldn't compiling Python with a compiler that > > supports extended precision for intermediates allow Python to use > > extended precision for its immediates? > > I'm not

Re: come back and find python 3

2011-02-26 Thread Westley Martínez
On Sat, 2011-02-26 at 11:36 -0800, pipehappy wrote: > Hi, all > > Just come back to use Python, but find something has changed in Python > 3. > Like package name is no longer with capitalized char for each word in > the name; > convenient print is removed. > > And I don't know why can someone ins

Re: Python getting stuck

2011-02-26 Thread Westley Martínez
On Sat, 2011-02-26 at 17:10 -0800, Dan Stromberg wrote: > > On Sat, Feb 26, 2011 at 4:03 PM, Corey Richardson > wrote: > On 02/26/2011 06:55 PM, Shanush Premathasarathan wrote: > > Hi All, > > > > When I use cut, copy, paste, and any keyboard shortcuts, > P

Re: having both dynamic and static variables

2011-03-03 Thread Westley Martínez
On Wed, 2011-03-02 at 19:45 -0800, Yingjie Lan wrote: > Hi everyone, > > Variables in Python are resolved dynamically at runtime, which comes at a > performance cost. However, a lot of times we don't need that feature. > Variables > can be determined at compile time, which should boost up speed

Re: having both dynamic and static variables

2011-03-05 Thread Westley Martínez
On Sat, 2011-03-05 at 18:37 -0800, John Nagle wrote: > On 3/2/2011 9:27 PM, Steven D'Aprano wrote: > > On Wed, 02 Mar 2011 19:45:16 -0800, Yingjie Lan wrote: > > > >> Hi everyone, > >> > >> Variables in Python are resolved dynamically at runtime, which comes at > >> a performance cost. However, a l

Re: having both dynamic and static variables

2011-03-06 Thread Westley Martínez
On Sun, 2011-03-06 at 07:58 +, Steven D'Aprano wrote: > On Sat, 05 Mar 2011 20:33:49 -0800, Westley Martínez wrote: > > > On Sat, 2011-03-05 at 18:37 -0800, John Nagle wrote: > >> It's worth having some syntax for constants. I'd suggest > >>

Re: new to python, trying to choose a book.

2011-03-06 Thread Westley Martínez
On Sun, 2011-03-06 at 11:21 -0800, sogeking99 wrote: > hey. been looking into book for learning python(or what ever resource > really) two books are frequently recommended, learn python the hard > way and think python. i have also been recommended dive into python by > one person, who said it was f

Re: changing to function what works like a function

2011-03-07 Thread Westley Martínez
On Mon, 2011-03-07 at 03:33 -0800, Victor Paraschiv wrote: > Hi everyone > i understood that the goal of Python is to make programing easy (of > course, powerful at the same time). > I think one way to do it is to eliminate unnecessary syntax > exceptions. One is the following: > for a complex numb

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-11 Thread Westley Martínez
On Thu, 2011-03-10 at 17:58 -0800, n00m wrote: > http://docs.python.org/py3k/whatsnew/3.0.html > > What's the fuss abt it? Imo all is ***OK*** with 3k (in the parts I > understand). > I even liked print as a function **more** than print as a stmt > > Now I think that Py3k is better than all prev

Re: value of pi and 22/7

2011-03-18 Thread Westley Martínez
On Fri, 2011-03-18 at 02:10 -0700, peter wrote: > On Mar 17, 5:22 pm, Kee Nethery wrote: > > My favorite approximation is: 355/113 (visualize 113355 split into two 113 > > 355 and then do the division). The first 6 decimal places are the same. > > > > 3.141592920353982 = 355/113 > > vs > > 3.141

Re: Reading/Writing files

2011-03-18 Thread Westley Martínez
On Fri, 2011-03-18 at 15:56 -0600, Jon Herman wrote: > Jack, > > thanks. > > Alright, so what I did is create a file called hello.txt with a single > line of text in there. I then did the following: > > f="fulldirectory\hello.txt" (where fulldirectory is of course the > actual full directory on

Re: Reading/Writing files

2011-03-18 Thread Westley Martínez
On Fri, 2011-03-18 at 15:18 -0700, Dan Stromberg wrote: > > Are you on windows? > > You shouldn't use / or \ on Windows. You should use os.path.join(). On Windows, when you start mixing / with \\ and spaces things can get hairy and obscure. It's always best to just use os.path.join(). -

Re: Guido rethinking removal of cmp from sort method

2011-03-25 Thread Westley Martínez
On Fri, 2011-03-25 at 07:11 +0100, Stefan Behnel wrote: > Steven D'Aprano, 25.03.2011 06:46: > > On Thu, 24 Mar 2011 18:32:11 -0700, Carl Banks wrote: > > > >> It's probably the least justified builtin other than pow. > > > > I don't know about that. Correctly, efficiently and *quickly* > > impleme

Re: Reading/Writing files

2011-03-25 Thread Westley Martínez
On Fri, 2011-03-25 at 05:39 -0700, Ethan Furman wrote: > On 3/18/2011 6:25 PM, Dan Stromberg wrote: > > > > On Fri, Mar 18, 2011 at 4:00 PM, Ethan Furman > > wrote: > > > > Dan Stromberg wrote: > > > > > > Are you on windows? > > > > You probably shou

Running Websites with Python

2011-04-01 Thread Westley Martínez
I discovered this yesterday, and finished watching today. Just an interesting video. http://www.youtube.com/watch?v=4R-7ZO4I1pI It's a brief video on how a programmer has been using Python to manage his website. I found it interesting that he gradually moved components of his website from JavaS

Re: [OT] Free software versus software idea patents

2011-04-08 Thread Westley Martínez
On Fri, 2011-04-08 at 01:41 -0500, harrismh777 wrote: > Steven D'Aprano wrote: > > Just like Python, Apache, and the Linux kernel. What are you going to do > > to punish them? > > What do you mean 'just like"?They are nothing alike. > > (which is why the community is upset by sone, but no

Re: [OT] Free software versus software idea patents

2011-04-10 Thread Westley Martínez
On Sat, 2011-04-09 at 23:55 +, Steven D'Aprano wrote: > On Fri, 08 Apr 2011 01:37:45 -0500, harrismh777 wrote: > > > Steven D'Aprano wrote: > >>> The reason Mono gets hit (from others besides me) is that they are in > >>> > partnership and collaboration with Microsoft, consciously and > >>>

Re: [OT] Free software versus software idea patents

2011-04-10 Thread Westley Martínez
On Mon, 2011-04-11 at 10:18 +1000, Chris Angelico wrote: > On Mon, Apr 11, 2011 at 10:04 AM, harrismh777 wrote: > >Not so fast there, Steve. If they [Microsoft] are paying anything > > (unsubstantiated, unknowable) to Python, Apache, or (Linux, whatever you > > mean by that term...) there are

Re: [Feature Request] dict.setdefault()

2011-04-11 Thread Westley Martínez
On Mon, 2011-04-11 at 14:35 -0700, rantingrick wrote: > setdefault should take **kw args in the case of needing to set > multiple defaults at one time. I would even settle for an *arg list if > i had to. Anything is better than... > > d.setdefault(blah, blah) > d.setdefault(blah, blah) > d.setdefa

Re: [OT] Free software versus software idea patents

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 04:22 -0500, harrismh777 wrote: > Ian Kelly wrote: > >> > The desktop > >> > is all that is left... and that is dying... rapidly. Their lockin is > >> > well > >> > entrenched (like Borg implants ) but the number of mom& pops ( like my > >> > entire extended family, for

Re: dict.setdefault()

2011-04-12 Thread Westley Martínez
On Mon, 2011-04-11 at 19:58 -0700, rantingrick wrote: > > > >>> dict.update(D, cobblerexistingkeys=False) Fix'd Much yummier now. -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature suggestion -- return if true

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 12:44 +1000, Chris Angelico wrote: > On Tue, Apr 12, 2011 at 12:20 PM, James Mills > wrote: > > On Tue, Apr 12, 2011 at 12:18 PM, Jason Swails > > wrote: > >> This is only true if n < 5. Otherwise, the first returns None and the > >> second returns False. > > > > Which is

Re: Feature suggestion -- return if true

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 07:58 -0700, scattered wrote: > On Apr 12, 10:05 am, Westley Martínez wrote: > > On Tue, 2011-04-12 at 12:44 +1000, Chris Angelico wrote: > > > On Tue, Apr 12, 2011 at 12:20 PM, James Mills > > > wrote: > > > > On Tue, Apr 12, 2011 at

Re: OT] Free software versus software idea patents

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 15:38 +0100, wisecrac...@tesco.net wrote: > Hi Westley... > > > The pre-builts from Best Buy that get reloaded, reloaded with what? I > > live in California, the center of software development. I only know one > > person who uses Linux, and they only use it for work (he doe

Re: Free software versus software idea patents

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 11:13 -0700, geremy condra wrote: > On Tue, Apr 12, 2011 at 10:48 AM, CM wrote: > >> I don't even know one person who has Win7 installed, running, and likes > >> it... > >> not even one. > > > > Hi, m harris, nice to meet you. Now you do. > > > > To the online community:

Re: Feature suggestion -- return if true

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 16:06 -0700, Ethan Furman wrote: > James Mills wrote: > > Are we done with this discussion yet ? :) > > *sigh* It was a slow day yesterday and I have > > a funny feeling it's going to be the same today! > > > > Regardless of anyone's subjective opinions as to what > > was cle

Re: Egos, heartlessness, and limitations

2011-04-13 Thread Westley Martínez
On Wed, 2011-04-13 at 17:39 -0700, rantingrick wrote: > You know Python is the best damn scripting language in the world. > However we harbor a collective secret, an elephant sized skeleton in > the community closet, a shameful scarlet letter of heartlessness and > ego centric-ity. Why is this the

Re: Egos, heartlessness, and limitations

2011-04-14 Thread Westley Martínez
On Wed, 2011-04-13 at 20:26 -0700, rantingrick wrote: > On Apr 13, 10:01 pm, Ryan Kelly wrote: > > On Wed, 2011-04-13 at 19:10 -0700, rantingrick wrote: > > > On Apr 13, 8:29 pm, Ryan Kelly wrote: > > > > On Wed, 2011-04-13 at 17:39 -0700, rantingrick wrote: > [...] > > > Funny you should bring

Re: [OT] Free software versus software idea patents

2011-04-14 Thread Westley Martínez
On Thu, 2011-04-14 at 14:02 +, Steven D'Aprano wrote: > On Thu, 14 Apr 2011 19:15:05 +1000, Chris Angelico wrote: > > > 4) Assumes people aren't deliberately fiddling the figures. Yeah, that > > would be correct. We're in the realm of conspiracy theories here... does > > anyone seriously think

Re: [OT] Free software versus software idea patents

2011-04-14 Thread Westley Martínez
On Thu, 2011-04-14 at 14:02 +, Steven D'Aprano wrote: > On Thu, 14 Apr 2011 19:15:05 +1000, Chris Angelico wrote: > > > 4) Assumes people aren't deliberately fiddling the figures. Yeah, that > > would be correct. We're in the realm of conspiracy theories here... does > > anyone seriously think

Re: [OT] Free software versus software idea patents

2011-04-14 Thread Westley Martínez
On Fri, 2011-04-15 at 08:01 +1000, Chris Angelico wrote: > On Fri, Apr 15, 2011 at 7:36 AM, Martin Gregorie > wrote: > > I think the only real evil is to set out to make a non-standards- > > compliant server and then design client software that seeks to lock in > > people to your server. FWIW I'm

Re: Python IDE/text-editor

2011-04-16 Thread Westley Martínez
On Sat, 2011-04-16 at 17:14 -0500, John Bokma wrote: > candide writes: > > > Le 16/04/2011 15:50, Adam Tauno Williams a écrit : > > > >> gedit provides a Python interpreter/console 'embedded' in the GUI > >> (provided the plugin is enabled). > >> > > > > > > I agree, cf. this screenshot : > > >

Re: Python IDE/text-editor

2011-04-17 Thread Westley Martínez
On Sat, 2011-04-16 at 23:12 +, Krzysztof Bieniasz wrote: > > It takes a day or two to learn emacs. > > > > It takes forever to set it up. > > Remember, Emacs is THE way. It's the light in the darkness, it'll save > your soul and bring you happiness. Isn't it worth the trouble? :) > > Seriou

Re: Python IDE/text-editor

2011-04-17 Thread Westley Martínez
On Sun, 2011-04-17 at 09:08 +1000, Chris Angelico wrote: > On Sun, Apr 17, 2011 at 8:31 AM, Westley Martínez wrote: > > > > Either way doesn't it require python be installed on the system? > > Most Python development is going to require that... > > I'm rat

Re: [Tutor] working with strings in python3

2011-04-18 Thread Westley Martínez
On Tue, 2011-04-19 at 10:34 +1000, James Mills wrote: > On Tue, Apr 19, 2011 at 10:17 AM, Rance Hall wrote: > > pseudo code: > > > > > > message = "Bah." > > > > if test: > > message = message + " Humbug!" > > > > print(message) > > > > end pseudo code > > Normally it's considered bad practise

Re: [Tutor] working with strings in python3

2011-04-18 Thread Westley Martínez
On Mon, 2011-04-18 at 21:23 -0400, Benjamin Kaplan wrote: > message = "%s %s" % (message, " Humbug!") fix'd -- http://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] working with strings in python3

2011-04-18 Thread Westley Martínez
On Tue, 2011-04-19 at 02:16 +, Steven D'Aprano wrote: > On Tue, 19 Apr 2011 10:34:27 +1000, James Mills wrote: > > > Normally it's considered bad practise to concatenate strings. > > *Repeatedly*. > > There's nothing wrong with concatenating (say) two or three strings. > What's a bad idea

Re: Python IDE/text-editor

2011-04-18 Thread Westley Martínez
On Tue, 2011-04-19 at 06:51 +0300, Teemu Likonen wrote: > * 2011-04-19T00:40:09+10:00 * Alec Taylor wrote: > > Please continue recommending > > Vim. > > * 2011-04-19T02:41:11+10:00 * Alec Taylor wrote: > > Please continue suggesting Python IDEs and/or fixes for the above > > Cons. > > Vim. > >

Re: IDLE bug

2011-04-18 Thread Westley Martínez
On Mon, 2011-04-18 at 23:05 -0500, harrismh777 wrote: > Are bug reports wanted here, or just in issue tracker? > > thanks > If it's a super-critical bug that can destroy data, yes, else just the issue tracker. -- http://mail.python.org/mailman/listinfo/python-list

Re: Equivalent code to the bool() built-in function

2011-04-19 Thread Westley Martínez
On Tue, 2011-04-19 at 19:00 +1000, Chris Angelico wrote: > On Tue, Apr 19, 2011 at 6:43 PM, Steven D'Aprano > wrote: > > but I don't see how > > > > (arbitrary expression) + (another expression) + ... + (last expression) > > > > can have any guarantees applied. I mean, you can't even guarantee tha

Re: Teaching Python

2011-04-21 Thread Westley Martínez
On Thu, Apr 21, 2011 at 06:02:08AM +0200, Stefan Behnel wrote: > Ben Finney, 20.04.2011 02:06: > >Dan Stromberg writes: > > > >>On Tue, Apr 19, 2011 at 4:03 PM, geremy condra wrote: > >>>When you say 'hacking', you mean ? > >> > >>Presumably he meant the real meaning of the word, not what the p

Re: learnpython.org - an online interactive Python tutorial

2011-04-21 Thread Westley Martínez
On Thu, Apr 21, 2011 at 05:19:29PM +1000, Chris Angelico wrote: > On Thu, Apr 21, 2011 at 5:10 PM, Algis Kabaila wrote: > > False: Python IS strongly typed, without doubt (though the > > variables are not explicitly declared.) > > Strongly duck-typed though. If I create a class that has all the r

Re: is there a difference between one line and many lines

2011-04-21 Thread Westley Martínez
On Thu, Apr 21, 2011 at 02:38:52AM -0700, vino19 wrote: > Hello, I'm a newbie. > What's the defference between > > >>>a=-6; b=-6; a is b > >>>True > > and > > >>>a=-6 > >>>b=-6 > >>>a is b > >>>False > > ? > -- > http://mail.python.org/mailman/listinfo/python-list Depends on how the interpret

Re: Teaching Python

2011-04-21 Thread Westley Martínez
On Thu, Apr 21, 2011 at 05:11:32PM +0100, MRAB wrote: > On 21/04/2011 14:58, Westley Martínez wrote: > >On Thu, Apr 21, 2011 at 06:02:08AM +0200, Stefan Behnel wrote: > >>Ben Finney, 20.04.2011 02:06: > >>>Dan Stromberg writes: > >>> > >>>

Re: Argument count mismatch

2011-04-21 Thread Westley Martínez
On Thu, Apr 21, 2011 at 12:33:09PM -0700, RVince wrote: > I am getting the following: > > Error - : cmseditorlinemethod() takes > exactly 2 arguments (1 given) > > When I make the following call: > > http://localhost/eligibility/cmseditorlinemethod/474724434 > > Which invokes: > > def cmsedito

Re: Teaching Python

2011-04-21 Thread Westley Martínez
On Fri, Apr 22, 2011 at 01:25:00AM +0100, MRAB wrote: > On 21/04/2011 23:36, Westley Martínez wrote: > >On Thu, Apr 21, 2011 at 05:11:32PM +0100, MRAB wrote: > >>On 21/04/2011 14:58, Westley Martínez wrote: > >>>On Thu, Apr 21, 2011 at 06:02:08AM +0200, Stefan

Re: Teaching Python

2011-04-22 Thread Westley Martínez
On Fri, Apr 22, 2011 at 01:04:55AM -0500, harrismh777 wrote: > Westley Martínez wrote: > >But really, hack > >> >has always been a negative term. It's original definition is chopping, > >> >breaking down, kind of like chopping down the security on someone e

Re: Input() in Python3

2011-04-22 Thread Westley Martínez
On Fri, Apr 22, 2011 at 04:49:19PM +1000, Chris Angelico wrote: > On Fri, Apr 22, 2011 at 4:22 PM, harrismh777 wrote: > > now we get this for input(): > > > >   raw_input("prompt>") --> string > > I would have to say that the 2.x behaviour of input() is a mistake > that's being corrected in 3.x.

Re: Input() in Python3

2011-04-23 Thread Westley Martínez
On Fri, Apr 22, 2011 at 10:08:20AM -0400, Mel wrote: > Westley Martínez wrote: > > On Fri, Apr 22, 2011 at 04:49:19PM +1000, Chris Angelico wrote: > > >> U NO. NO NO NO. What if someone enters "os.exit()" as their > >> number? You shouldn't

Re: learnpython.org - an online interactive Python tutorial

2011-04-23 Thread Westley Martínez
On Fri, Apr 22, 2011 at 04:48:39PM -0700, Dan Stromberg wrote: > On Thu, Apr 21, 2011 at 11:38 PM, harrismh777 wrote: > > > > > Yes. And you have managed to point out a serious flaw in the overall logic > > and consistency of Python, IMHO. > > > > Strings should auto-type-promote to numbers if app

Origin of 'self'

2014-03-02 Thread Westley Martínez
e that I'm curious about nevertheless. Sincerely, Westley Martínez -- https://mail.python.org/mailman/listinfo/python-list

Re: Origin of 'self'

2014-03-05 Thread Westley Martínez
Why did C++ use this? I don't really like this. It doesn't sound right. I think it's because I have trouble saying the th sound without getting my mouth full of spit. Thankfully you don't often need to use this in C++ like you do with self in Python. -- https://mail.python.org/mailman/listinfo

Building tkinter on Windows

2013-09-08 Thread Westley Martínez
Hello. Can anyone tell me how to build tkinter on Windows? I've downloaded the source, ran Tools/buildbot/external.bat to build the external dependencies. I copied tcl85g.dll and tk85g.dll to PCBuild. I built the Visual Studio solution. Everything built fine without errors. Everything seem

Re: Building tkinter on Windows

2013-09-09 Thread Westley Martínez
On Monday, September 9, 2013 12:43:16 AM UTC-7, Terry Reedy wrote: > Some combination of the README instructions, external.bat, and the > > project files are not correct. There may be an issue on the tracker. I > > believe I copied tcl85g.dll and tk85g.dll into .../py3x/pcbuild from > > .../t

Re: better and user friendly IDE recommended?

2013-09-12 Thread Westley Martínez
On Wednesday, September 11, 2013 7:14:04 AM UTC-7, mnishpsyched wrote: > Hey i am a programmer but new to python. Can anyone guide me in knowing which > is a better IDE used to develop web related apps that connect to DB using > python? I use vim and idle. -- https://mail.python.org/mailman/lis

Re: reload and work flow suggestions

2013-09-21 Thread Westley Martínez
On Saturday, September 21, 2013 2:43:13 PM UTC-7, Peter Cacioppi wrote: > This is an idea brought over from another post. > > > > When I write Python code I generally have 2 or 3 windows open simultaneously. > > > > 1) An editor for the actual code. > > 2) The interactive interpreter. > > 3

Re: stackoverflow and c.l.py

2011-09-14 Thread Westley Martínez
On Wed, Sep 14, 2011 at 10:47:15PM +1000, Chris Angelico wrote: > On Wed, Sep 14, 2011 at 10:33 PM, memilanuk wrote: > > Not saying one is necessarily better than the other, but just subscribing to > > the feed for the [python] tag on SO has a pretty good SNR... > > The SNR here isn't bad either.

Re: stackoverflow and c.l.py

2011-09-14 Thread Westley Martínez
On Wed, Sep 14, 2011 at 06:05:23AM -0700, memilanuk wrote: > On 09/14/2011 05:47 AM, Chris Angelico wrote: > >The SNR here isn't bad either. Most of the spam gets filtered out, and > >even stuff like Ranting Rick posts can be of some amusement when it's > >a slow day... > > I subscribe to the list

Re: stackoverflow and c.l.py

2011-09-15 Thread Westley Martínez
On Thu, Sep 15, 2011 at 09:58:32AM +1000, Steven D'Aprano wrote: > memilanuk wrote: > > > On 09/14/2011 05:47 AM, Chris Angelico wrote: > >> The SNR here isn't bad either. Most of the spam gets filtered out, and > >> even stuff like Ranting Rick posts can be of some amusement when it's > >> a slow

Re: Python bug in Windows 8--report now, or later?

2011-09-17 Thread Westley Martínez
On Sun, Sep 18, 2011 at 04:15:57AM +, Grant Edwards wrote: > On 2011-09-17, Chris Angelico wrote: > > > I would consider reporting it as a bug in Windows 8, not a bug in > > Good luck with that plan. ;) > > [I don't know anything about this particular issue, but I do know that > when ther

Re: Operator commutativity

2011-09-19 Thread Westley Martínez
On Mon, Sep 19, 2011 at 01:11:51PM +0200, Henrik Faber wrote: > Hi there, > > when I have a python class X which overloads an operator, I can use that > operator to do any operation for example with an integer > > y = X() + 123 > > however, say I want the "+" operator to be commutative. Then >

Re: Operator commutativity

2011-09-19 Thread Westley Martínez
On Mon, Sep 19, 2011 at 10:26:30PM -0400, Roy Smith wrote: > In article <4e77eae1$0$29978$c3e8da3$54964...@news.astraweb.com>, > Steven D'Aprano wrote: > > > Westley Mart??nez wrote: > > > > > def __radd__(self, other): > > > return self.__add__(self, other) > > > > Which, inside a class,

Re: Suggested coding style

2011-09-28 Thread Westley Martínez
On Wed, Sep 28, 2011 at 07:11:08PM -0700, rantingrick wrote: > On Sep 28, 6:26 pm, Tim Johnson wrote: > > * DevPlayer [110928 04:31]: > > > On Sep 27, 10:25 pm, alex23 wrote: > > > > rantingrick wrote: > > > > > Since, like the bible > > > > > the zen is self contradicting, any argument utilizi

Re: syntactic sugar for def?

2011-09-28 Thread Westley Martínez
On Wed, Sep 28, 2011 at 07:01:11PM -0400, Terry Reedy wrote: > On 9/28/2011 5:26 PM, Ethan Furman wrote: > > >I don't remember if 'def' is sugar for something besides lambda. > > That is a bit backwards. > lambda x: expr(x) > is syntactic sugar for > def (x): return expr(x) > del > ;-) >

Re: Suggested coding style

2011-09-29 Thread Westley Martínez
On Thu, Sep 29, 2011 at 08:37:53PM +1000, Steven D'Aprano wrote: > Westley Martínez wrote: > > > Perhaps you should spend a little less time on the mailing list and a > > little more time in church. > > Is that meant as punishment for Rick or for the churchgo

Re: Suggested coding style

2011-09-29 Thread Westley Martínez
On Thu, Sep 29, 2011 at 05:23:30AM -0700, rantingrick wrote: > On Sep 29, 5:37 am, Passiday wrote: > > What is so bad about breaking code in obscure places? We changed print > to a function which broke just about every piece of code every written > in this language. (BTW, print should ALWAYS hav

Re: [OT] Benefit and belief

2011-09-29 Thread Westley Martínez
On Thu, Sep 29, 2011 at 02:49:05PM -0400, Devin Jeanpierre wrote: > >> This was a technical discussion, and calling the bible a joke was not > >> necessary at all. It creates a hostile atmosphere. > > > > I disagree. It was not an attack on any person nor group of people. If > > we are to be requir

[OT] Off-Topic Posts and Threads on the Python Mailing List

2011-09-29 Thread Westley Martínez
I'm kind of new to the whole mailing list thing, but they seem to be a lot more lenient than internet forums about most things. I've noticed that sometimes Off-topic posts can get a little out of hand. I guess it's not really a big deal, but it bothers me, and the trolls just love to feed on it.

Re: Suggested coding style

2011-09-29 Thread Westley Martínez
On Thu, Sep 29, 2011 at 07:07:28PM -0400, Devin Jeanpierre wrote: > > However, as you use the new format method you will come to appreciate > > it. It's an adult beverage with an acquired taste. ;-) > > Yeah. It's a much more difficult to read thing, but once you learn how > to write it it flows f

Re: Benefit and belief

2011-09-30 Thread Westley Martínez
On Fri, Sep 30, 2011 at 09:22:59AM -0700, rusi wrote: > On Sep 30, 8:58 pm, Neil Cerutti wrote: > > On 2011-09-30, DevPlayer wrote: > > > > > > > > > I still assert that contradiction is caused by narrow perspective. > > > > > By that I mean: just because an objects scope may not see a certain >

Re: Benefit and belief

2011-09-30 Thread Westley Martínez
On Fri, Sep 30, 2011 at 11:08:16AM -0700, rantingrick wrote: > On Sep 30, 11:36 am, Westley Martínez wrote: > > On Fri, Sep 30, 2011 at 09:22:59AM -0700, rusi wrote: > > > On Sep 30, 8:58�pm, Neil Cerutti wrote: > > > > On 2011-09-30, DevPlayer wrote: >

Re: overloading operators for a function object

2011-10-03 Thread Westley Martínez
On Fri, Sep 30, 2011 at 09:50:42PM -0700, Fletcher Johnson wrote: > Is it possible to overload operators for a function? > > For instance I would like to do something roughly like... > > def func_maker(): > def func(): pass > > def __eq__(other): > if other == "check": return True >

Re: Is it possible to create C-style "main" function in Python? (for teaching purposes)

2011-10-04 Thread Westley Martínez
On Mon, Oct 03, 2011 at 09:35:16PM -0700, alex23 wrote: > Sorry for hijacking Alec's response but I didn't see the OP. > > > Aivar Annamaa wrote: > > > I'm looking for a trick or hidden feature to make Python 3 automatically > > > call a "main" function but without programmers writing `if __name_

Re: Is it possible to create C-style "main" function in Python? (for teaching purposes)

2011-10-05 Thread Westley Martínez
On Tue, Oct 04, 2011 at 08:20:34PM -0700, alex23 wrote: > Steven D'Aprano wrote: > > Imported modules are variables like any other, and as they usually exist > > in the global scope, so they will all need to be explicitly referenced as > > global. This will get tiresome very quickly, and is a cure

Re: recommend a graphics library for plotting by the pixel?

2011-10-05 Thread Westley Martínez
On Wed, Oct 05, 2011 at 02:29:38PM +0100, Adam Funk wrote: > On 2011-10-04, Derek Simkowiak wrote: > > > If this is strictly for 2D pixel graphics, I recommend using PyGame > > (aka SDL). Why do you not think it's the way to go? It was built for > > this type of thing. > > I only know Py

Re: syntax enhancement

2011-10-05 Thread Westley Martínez
On Wed, Oct 05, 2011 at 01:31:41PM -0500, Tim Chase wrote: > On 10/04/11 20:45, Terry Reedy wrote: > >On 10/4/2011 9:50 AM, Valiev Sergey wrote: > > > >>- `[]` - used for list comprehension, > >>- `()` - used for generators, > >>- `[start:stop]` / `[start:stop:step]` - used for slices. > >>The idea

Re: Is it possible to create C-style "main" function in Python? (for teaching purposes)

2011-10-05 Thread Westley Martínez
On Thu, Oct 06, 2011 at 02:44:33PM +1100, Cameron Simpson wrote: > On 03Oct2011 13:10, rantingrick wrote: > | Also for scoping. > | > | py> count = 0 > | py> def foo(): > | ... global.count += 1 > | py> print count > | 1 > | > | Why? Well because many times i find myself wondering if this or

Re: Usefulness of the "not in" operator

2011-10-09 Thread Westley Martínez
On Sat, Oct 08, 2011 at 12:34:42PM -0400, Roy Smith wrote: > In article <4e906108$0$27980$426a3...@news.free.fr>, > candide wrote: > > > After browsing source code, I realize that parenthesis are not necessary > > ("not" has higher precedence than "in"). > > Here's my take on parenthesis: If

Re: shipping python

2011-10-11 Thread Westley Martínez
On Tue, Oct 11, 2011 at 05:04:45PM -0600, Kristen J. Webb wrote: > I am new to python coming from the C/shell side. > We have been experimenting with some code > samples and now I'm looking at some command line > argument processing. I find > > getopt older > optparse new in 2.3 > argparse new in

Re: Opportunity missed by Python ?

2011-10-13 Thread Westley Martínez
On Thu, Oct 13, 2011 at 11:45:06AM +0200, candide wrote: > Dart is the very new language created by Google to replace Javascript. > So Python was not able to do the job? Or may be they don't know > about Python at Google ;) ? Google's a big supporter for Python...I think Guido working being employ

Re: Opportunity missed by Python ?

2011-10-13 Thread Westley Martínez
On Thu, Oct 13, 2011 at 09:07:09PM +1100, Chris Angelico wrote: > On Thu, Oct 13, 2011 at 8:45 PM, candide wrote: > > Dart is the very new language created by Google to replace Javascript. > > So Python was not able to do the job? Or may be they don't know about Python > > at Google ;) ? > > > >

Re: Language Enhancement Idea to help with multi-processing (your opinions please)

2011-10-14 Thread Westley Martínez
On Thu, Oct 13, 2011 at 11:56:20PM -0700, Carl Banks wrote: > On Thursday, October 13, 2011 7:16:37 PM UTC-7, Steven D'Aprano wrote: > > > What I would expect to happen that all statements within the ooo block > > > may be executed out > > > of order. The block itself waits till all statements are

Re: Can I search a list for a range of values?

2011-10-14 Thread Westley Martínez
On Fri, Oct 14, 2011 at 05:01:04PM -0600, Ian Kelly wrote: > On Fri, Oct 14, 2011 at 4:30 PM, Tim Chase > wrote: > > On 10/14/11 17:20, Chris Angelico wrote: > >> > >> Try a list comprehension: > >> > > a = [2,4,5,6,3,9,10,34,39,59,20,15,13,14] > > [i for i in a if i>=10 if i<=20] > >> > >

Re: Equal sets with unequal print and str() representations

2011-10-17 Thread Westley Martínez
On Sun, Oct 16, 2011 at 05:52:03PM -0600, Ganesh Gopalakrishnan wrote: > This probably is known, but a potential pitfall (was, for me) > nevertheless. I suspect it is due to hash collisions between 's3' > and 's13' in this case? It happens only rarely, depending on the > contents of the set. > > >

Re: [OT] Re: Benefit and belief

2011-10-19 Thread Westley Martínez
On Wed, Oct 19, 2011 at 09:01:39PM +, Steven D'Aprano wrote: > On Wed, 19 Oct 2011 13:15:54 +, Curt wrote: > > > On 2011-10-19, Steven D'Aprano > > wrote: > >> On Tue, 18 Oct 2011 14:23:49 +, Curt wrote: > >> > >>> Most of us say "un et un _font_ deux," in fact, because we know how to

Re: compare range objects

2011-10-20 Thread Westley Martínez
On Thu, Oct 20, 2011 at 06:19:40AM -0700, Yingjie Lan wrote: > Hi,  > > Is it possible to test if two range objects contain the same sequence of > integers by the following algorithm in Python 3.2? > > 1. standardize the ending bound by letting it be the first excluded integer > for the given s

Re: [OT] Re: Benefit and belief

2011-10-20 Thread Westley Martínez
On Thu, Oct 20, 2011 at 06:05:00PM -0400, Prasad, Ramit wrote: > >I think you need to speak German fluently to be a good programmer. > Why? > I won't reveal my secrets to JP Morgan Chase! I am loyal to the mighty Bank of America. -- http://mail.python.org/mailman/listinfo/python-list

Re: Line continuation issue\

2011-11-08 Thread Westley Martínez
On Fri, Nov 04, 2011 at 11:10:58AM -0400, Steven Lehar wrote: > Is this the right place to propose language extensions? > > My Python code keeps expanding rightwards, it is difficult to keep it > contained within reasonable limits. But the standard line continuation \ > is positively anti-Pythonic

  1   2   >