[How to change redirect stderr?]

2006-03-10 Thread Moretti
Hello, I would like to be able to change the standard error path. How can I do this in a script if I want to send error messages to /dev/null by example ? Thanks -- Sebastien Moretti -- http://mail.python.org/mailman/listinfo/python-list

Re: [How to change redirect stderr?]

2006-03-12 Thread Moretti
Fredrik Lundh wrote: > "Moretti" wrote: > >> I would like to be able to change the standard error path. > > (I'm not sure path is the right word here, really, but never mind...) > >> How can I do this in a script if I want to send error messages t

Re: Will python never intend to support private, protected and public?

2005-09-29 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: > On Fri, 30 Sep 2005 00:16:02 +1000 > Steven D'Aprano wrote: > >>Say you have written a class, with a private variable. I decide that I >>need access to that variable, for reasons you never foresaw. > > What if the access to that variable was forbidden for reasons you ne

Re: A rather unpythonic way of doing things

2005-09-29 Thread Rocco Moretti
fraca7 wrote: > Richie Hindle a écrit : > >> [Peter] >> >>> http://www.pick.ucam.org/~ptc24/yvfc.html >> >> >> >> [Jeff] >> >>> Yuma Valley Agricultural Center? >>> Yaak Valley Forest Council? >> >> >> >> I went through the same process. My guess is "Yes, Very F'ing Clever." >> Peter? >> > > pri

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Rocco Moretti
Antoon Pardon wrote: >>What if the class author removes a non-private variable or changes a >>method's documented parameters in the next version of the class, because >>he think it'll work better, or just because he can? > > Changing an interface is different from changing the implementation.

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Rocco Moretti
Paul Rubin wrote: > I don't know of a single program that's actually relying on the > non-enforcement. I've asked for examples but have only gotten > theoretical ones. As far as I can tell, the feature is useless. I'd like to turn the question around on you - can you come up with an instance w

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Rocco Moretti
Reinhold Birkenfeld wrote: > Hi, > > after Guido's pronouncement yesterday, in one of the next versions of Python > there will be a conditional expression with the following syntax: > > X if C else Y Any word on chaining? That is, what would happen with the following constructs: A if B else C

Re: Reply-To header

2005-10-03 Thread Rocco Moretti
Roel Schroeven wrote: > Peter Decker wrote: > >>On 10/3/05, Roel Schroeven <[EMAIL PROTECTED]> wrote: >> >>On lists like this, where everyone benefits by sharing information, it >>seems pretty lame to hide behind purist arguments about Reply-To: >>headers. The default behavior should be the one mo

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Rocco Moretti
Steve Holden wrote: >> On Fri, 07 Oct 2005 00:33:43 -, Grant Edwards <[EMAIL PROTECTED]> >> wrote: >>> For example: In British English one uses a plural verb when the >>> subject consists of more than one person. Sports teams, >>> government departments, states, corporations etc. are gramma

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-10-10 Thread Rocco Moretti
Duncan Smith wrote: > Steve Holden wrote: > >>There are special rules for the monarchs, who are expected to refer to >>themselves in the first person plural. >> > > Yes, although I'm not actually sure where the 'royal we' comes from; I was under the (probably misinformed) impression that since

Re: Very dumb question

2005-10-12 Thread Rocco Moretti
Laszlo Zsolt Nagy wrote: > Laszlo Zsolt Nagy wrote: > >> I have a program with this code fragment: >> >>print len(data) >>print data[:50] >>raise SystemExit >> >> This prints: >> >> 20381 >> > >> But if I change 50 to 51 >> >>print len(data) >>print data[:51] >>raise System

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-20 Thread Rocco Moretti
James Stroud wrote: > I propose that any time anyone suggests switching to Windows, the reasons for > such should be explicitly described, and not left to interpretation. I propose that any time anyone suggests switching to Linux ... I propose that any time anyone suggests switching to Mac ... I

Re: Suggestion for (re)try statement

2005-10-28 Thread Rocco Moretti
Sori Schwimmer wrote: > Hi, > > I think that would be useful to have an improved > version of the "try" statement, as follows: > > try(retrys=0,timeout=0): > # things to try > except: > # what to do if failed > > and having the following semantic: > > for i in range(retrys): > try: >

Re: Python's website does a great disservice to the language

2005-11-01 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: > So the first thing you do when you go to a web page is to google if > they are going to redesign it? I think the implication was "The first thing to do before *suggesting that a redesign is nessasary* is to Google to see if such a redesign is taking place." -- http://

Re: Suggestion for (re)try statement

2005-11-02 Thread Rocco Moretti
Sori Schwimmer wrote: > 0) Sorry, I don't know how to post a reply in the same > thread. Usually it is simply hitting the "Reply" button/link/key combination on your mail/news reader when the post you want to reply to in view. (If you want reply to multiple people, you can always reply to the or

Re: Python's website does a great disservice to the language

2005-11-03 Thread Rocco Moretti
Alex Martelli wrote: > The Eternal Squire <[EMAIL PROTECTED]> wrote: >... > >>2) Consider what he really wants for a supervisor of software >>engineers. Ideally such a person should be a software engineer with >>at least 3 times the experience of the most junior member. Such a > > > I li

Re: I Need Motivation Part 2

2005-11-04 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: > i m losing my motivation with python because there are sooo many > modules, that i cant just learn them all, As other's have said, don't bother. If you ever need to use a module that you don't know, just go to http://docs.python.org/lib/lib.html (easily accessable fr

Re: [OT] Map of email origins to Python list

2005-11-07 Thread Rocco Moretti
Paul McGuire wrote: > "Claire McLister" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > We've been working with Google Maps, and have created a web service to > map origins of emails to a group. As a trial, we've developed a map of > emails to this group at: > > http://www.zees

Re: Map of email origins to Python list

2005-11-07 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: > Rocco Moretti wrote: > >>It's also a testament to the limited value of physically locating people >>by internet addresses - If you zoom in on the San Fransico bay area, and >>click on the southern most bubble (south of San Jose), you'l

Re: Proposal for adding symbols within Python

2005-11-14 Thread Rocco Moretti
Pierre Barbier de Reuille wrote: > Please, note that I am entirely open for every points on this proposal > (which I do not dare yet to call PEP). I still don't see why you can't just use strings. The only two issues I see you might have with them are a) two identical strings might not be identi

Re: is parameter an iterable?

2005-11-15 Thread Rocco Moretti
marduk wrote: > On Tue, 2005-11-15 at 11:01 -0800, py wrote: > >>I have function which takes an argument. My code needs that argument >>to be an iterable (something i can loop over)...so I dont care if its a >>list, tuple, etc. So I need a way to make sure that the argument is an >>iterable befo

Re: Proposal for adding symbols within Python

2005-11-15 Thread Rocco Moretti
Björn Lindström wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > > >>Why does the byte string "\x6f\x70\x65\x6e\x65\x64" have intrinsic >>meaning when the int 0 doesn't? It certainly doesn't mean anything to >>non-English speakers. >> >>If all you want is human readable byte strings, then j

Re: Proposal for adding symbols within Python

2005-11-16 Thread Rocco Moretti
Pierre Barbier de Reuille wrote: > Rocco Moretti a écrit : > [...] > >> >>I did, but I still don't see why it is an argument against using >>strings. The point you may not appreciate is that (C)Python already uses >>strings to represent names, as an important

Re: Adding through recursion

2005-11-18 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: > There is problaly a really simple answer to this, but why does this > function print the correct result but return "None": > > def add(x, y): > if x == 0: > print y > return y > else: > x -= 1 > y += 1 > add(x, y) > > prin

Re: [Fwd: Re: hex string to hex value]

2005-11-22 Thread Rocco Moretti
tim wrote: > ok, but if i do > > >>> n=66 > >>> m=hex(n) > >>> m > '0x42' > >>> h=int(m,16) > >>> h > 66 > >>> > > I end up with 66 again, back where I started, a decimal, right? > I want to end up with 0x42 as being a hex value, not a string, so i can > pas it as an argument to a function

Re: Which License Should I Use?

2005-11-28 Thread Rocco Moretti
Steven D'Aprano wrote: > On Fri, 25 Nov 2005 11:30:46 -0800, mojosam wrote: > >>I guess I don't care too much about how other people use it. > > Then probably the best licence to use is just to follow the lead of > Python. For that sort of small program of limited value, I put something > like th

Re: Which License Should I Use?

2005-11-28 Thread Rocco Moretti
mojosam wrote: > I've been watching the flame war about licenses with some interest. > There are many motivations for those who participate in this sector, so > disagreements over licenses reflect those agendas. One point that frequently gets ignored in licensing debates: The value of a license i

Re: General question about Python design goals

2005-12-01 Thread Rocco Moretti
Fredrik Lundh wrote: > Rick Wotnaz wrote: > > >>I'm sure Antoon wouldn't object if lists were to be allowed as >>dictionary keys, which would eliminate the multiple castings for >>that situation. I wouldn't, either. > > so what algorithm do you suggest for the new dictionary im- > plementation?

Re: General question about Python design goals

2005-12-01 Thread Rocco Moretti
Fredrik Lundh wrote: > Rocco Moretti wrote: > >>>>I'm sure Antoon wouldn't object if lists were to be allowed as >>>>dictionary keys, which would eliminate the multiple castings for >>>>that situation. I wouldn't, either. >>

Re: python university search

2005-12-05 Thread Rocco Moretti
josh wrote: > > hello, > > i am interested in doing an undergraduate major in computer science > that mainly focuses on python as a programming language.. It's your life, so you can live it as you choose, but I think you're missing the point of an undergraduate education if you focus too much o

Re: Documentation suggestions

2005-12-07 Thread Rocco Moretti
A.M. Kuchling wrote: > There's another struggle within the LibRef: is it a reference or a > tutorial? Does it list methods in alphabetical order so you can look > them up, or does it list them in a pedagogically useful order? I > think it has to be a reference; if each section were to be a tutor

Re: Bitching about the documentation...

2005-12-07 Thread Rocco Moretti
>>>One of my favourite examples of obfuscated English is this grammatically >>>correct sentence: >>> >>>"Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo." > > The punctuation is important. Reminds me of this old classic: Insert punctuation & capitalization to make the following

Re: Bitching about the documentation...

2005-12-08 Thread Rocco Moretti
Fredrik Lundh wrote: > Rocco Moretti wrote: > > >>Insert punctuation & capitalization to make the following a correct and >>coherent (if not a little tourtured). >> >>fred where guido had had had had had had had had had had had a better >>effect on the

Re: How to find the type ...

2005-12-09 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: thisisastring = "1" thisisanint = 1 type(thisisastring) > > > type(thisisanint) > > > thisisastring = int(thisisastring) thisisanint = str(thisisanint) type(thisisastring) > > > type(thisisanint) > > >>> print repr(thisisastring)

Re: Another scripting language implemented into Python itself?

2005-01-24 Thread Rocco Moretti
Roy Smith wrote: In article <[EMAIL PROTECTED]>, Quest Master <[EMAIL PROTECTED]> wrote: So, my question is simply this: is there an implementation of another scripting language into Python? Python *is* a scripting language. Why not just let your users write Python modules which you them impor

Re: Another scripting language implemented into Python itself?

2005-01-25 Thread Rocco Moretti
Bob Smith wrote: Rocco Moretti wrote: Python's also dangerous. Every time you do an "import module", you put your system at risk of crashing, having the hard-drive wiped Have you been drinking again? No, not really. The "every time" comment should be viewed in the same

Re: Another scripting language implemented into Python itself?

2005-01-25 Thread Rocco Moretti
Orlando Vazquez wrote: Jeff Shannon wrote: Because you cannot make Python secure against a malicious (or ignorant) user -- there's too much flexibility to be able to guard against every possible way in which user-code could harm the system. Parsing your own (limited) scripting language allows mu

Re: ANN: Tao Scripting Language 0.8.5 beta released!

2005-01-27 Thread Rocco Moretti
Limin Fu wrote: Dear all, I am glad to announce in this mailing list that the lastest version of a new scripting language has come out. Since you chose to announce it in this mailing list/newsgroup, may I suggest that a comparison with Python is in order? Since it is a new scripting language, I'm

Re: What is different with Python ?

2005-06-20 Thread Rocco Moretti
Andrea Griffini wrote: > Indeed when talking about if learning "C" can hinder > or help learning "C++" I remember thinking that to > learn "C++" *superficially* learning "C" first is > surely pointless or can even hinder. > But to learn "C++" deeply (with all its quirks) I > think that learning "C

Re: how to use more than 1 __init__ constructor in a class ?

2005-06-22 Thread Rocco Moretti
scott wrote: > hi people, > > can someone tell me, how to use a class like that* (or "simulate" more > than 1 constructor) : > #-- > class myPointClass: > def __init__(self, x=0, y=0): > self.x = x > self.y = y > def __init__(self, x=0, y=0, z=0): > self.__init__(self, x, y) >

Re: how to use more than 1 __init__ constructor in a class ?

2005-06-23 Thread Rocco Moretti
Steven D'Aprano wrote: > On Wed, 22 Jun 2005 12:34:21 -0500, Rocco Moretti wrote: > > >>You could also turn __init__ into a dispatch fuction: >> >>#-- >>class myPointClass: >> def __init__(self, *args): >> if len(args) <= 2: >

Re: OT: Re: Looking For Geodetic Python Software

2005-06-23 Thread Rocco Moretti
Tim Daneliuk wrote: > Diez B. Roggisch wrote: > >> Tim Daneliuk wrote: >> >>> Casey Hawthorne wrote: >>> Do your planes fly over the earth's surface or through the ground? >>> >>> >>> >>> >>> Why do you presume this has anything to do with airplanes? >>> >> >> That was supposed to be a f

Re: Thanks for PIL (and other stuff)

2005-06-24 Thread Rocco Moretti
jean-marc wrote: > PS If I knew that Python had a anniversary date, I'd also write to > thanks our BDFL (and authors)! But no such luck, so I'm restaining > myself! > ;-)) From the FAQ: > Here's a very brief summary of what started it all, written by Guido van > Rossum: > > > > During the 19

Re: a dictionary from a list

2005-06-24 Thread Rocco Moretti
David Bear wrote: > I know there must be a better way to phrase this so google understands, but > I don't know how.. So I'll ask people. > > Assume I have a list object called 'alist'. > > Is there an easy way to create a dictionary object with the members of > 'alist' being the keys in the dicti

Re: Which kid's beginners programming - Python or Forth?

2005-06-28 Thread Rocco Moretti
BORT wrote: > I am toying with the idea of teaching my ten year old a little about > programming. I started my search with something like "best FREE > programming language for kids." After MUCH clicking and high-level > scanning, I am looking at Python and Forth. Both have advocates that > say

Re: Which kid's beginners programming - Python or Forth?

2005-06-28 Thread Rocco Moretti
Rocco Moretti wrote: > It's been quite some time since I've looked at Forth, and the reference > material that I used then was probably outdated anyway. Sorry, thought of one more thing Python has going for it vs. Forth - reference material. Check the catalog of your local li

Re: Which kid's beginners programming - Python or Forth?

2005-06-29 Thread Rocco Moretti
BORT wrote: > Gentle folk of comp.lang.python, I heartily thank you all for your > input. I think I'm taking the boys through the door marked "Logo." We > may be back this way, though. We will likely need MORE in the nebulous > future. I am impressed with the outpouring of support here! Other

Re: Modules for inclusion in standard library?

2005-06-29 Thread Rocco Moretti
Paul Rubin wrote: > Gregory Piñero <[EMAIL PROTECTED]> writes: > >>I'd like to see some database API's to the most common databases >>included. > > Yes, certainly, this is a serious deficiency with Python. Except that (please correct me if I'm wrong) there is somewhat of a policy for not inclu

Re: Add methods to string objects.

2005-06-30 Thread Rocco Moretti
Roy Smith wrote: > In article <[EMAIL PROTECTED]>, > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > >>You can even get closer, but it is NOT recommended >> >>class foostr(str): >> def plural (self): >>if self.value[-1] in "sz": >>return self.value + "es" >>els

Re: Question about Python

2005-07-01 Thread Rocco Moretti
Jan Danielsson wrote: >However, when I look at the various Python modules/libraries, I see > that there are several versions of them, for different versions of > python. I've seen everything from "for python 1.5" up to "for python > 2.4" with all versions in between. This scares me a little bi

Re: Modules for inclusion in standard library?

2005-07-01 Thread Rocco Moretti
Paul Rubin wrote: > Rocco Moretti <[EMAIL PROTECTED]> writes: > >>Except that (please correct me if I'm wrong) there is somewhat of a >>policy for not including interface code for third party programs which >>are not part of the operating system. (I.e. the modu

Re: Assigning to None

2005-07-01 Thread Rocco Moretti
Mike Meyer wrote: > Peter Hansen <[EMAIL PROTECTED]> writes: > > >>Mike Meyer wrote: >> >>>Yes. I once grabbed an old program that did assignments to None. But >>>that's always been a bad idea. >> >>What was the use case!? > > > Unpacking a tuple. Something like this: > > (foo, bar,

Re: Favorite non-python language trick?

2005-07-01 Thread Rocco Moretti
Joseph Garvin wrote: > I'm curious -- what is everyone's favorite trick from a non-python > language? And -- why isn't it in Python? I'm not aware of a language that allows it, but recently I've found myself wanting the ability to transparently replace objects. For example, if you have a trans

Re: Assigning to None

2005-07-03 Thread Rocco Moretti
François Pinard wrote: > [Rocco Moretti] > > >>foo, bar, _ = gen_tuple(stuff) > > >>as '_' is already special cased (last result in interactive mode), and >>is already used for "don't care" sematics in Prolog. > > > `_&#x

Re: Favorite non-python language trick?

2005-07-03 Thread Rocco Moretti
Jp Calderone wrote: > On Fri, 01 Jul 2005 15:02:10 -0500, Rocco Moretti > <[EMAIL PROTECTED]> wrote: > >> >> I'm not aware of a language that allows it, but recently I've found >> myself wanting the ability to transparently replace objects. >

Re: Will Guido's "Python Regrets" ever get implemented/fixed?

2005-07-04 Thread Rocco Moretti
John Roth wrote: > "Peter Maas" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> George Sakkis schrieb: >> >>> Given that the latest 2.x python will be 2.9 >> >> >> Why not 2.13 or 2.4711? Version strings are sequences of arbitrary >> integers separated by dots and not decimal n

Re: Lisp development with macros faster than Python development?..

2005-07-06 Thread Rocco Moretti
Raymond Hettinger wrote: > [EMAIL PROTECTED] wrote: > >>The problem is that questions like 'What lang is fastest to develop >>in?' >>are hard to answer definitively. > > > FWIW, Google's answer to that question is C++, Java, and Python. For > any given problem, any of the three are acceptable.

Re: HELP!

2005-07-07 Thread Rocco Moretti
Ert Ert wrote: > Please help me i down loaded python nd itplays on MS-DOS mode and not on > normal please help Python itself is a command line program. "MS-DOS mode" *is* it's normal mode. As other's have mentioned, there are graphical front ends to Python which you may be more comforatble wit

Re: Python Module Exposure

2005-07-07 Thread Rocco Moretti
Robert Kern wrote: > Jacob Page wrote: > >> Does this newsgroup find attachments acceptable? > > No. Please put files somewhere on the web and post a URL. This would be > a good forum to informally announce and discuss your module. To add to what Robert said, keep in mind this newsgroup is als

Re: f*cking re module

2005-07-08 Thread Rocco Moretti
François Pinard wrote: > I once worked with a PL/I compiler (on a big IBM mainframe), which was > trying to be helpful by spitting pages of: > > Error SUCH AND SUCH, assuming that THIS AND THIS was meant. > > and continuing compilation nevertheless. It was a common joke to say > that PL/I w

Re: How does this code works:

2005-07-11 Thread Rocco Moretti
vch wrote: > Here's an example from some book: > > def foo(n): > s = [n] > def bar(i): > s[0] += i > return s[0] > return bar > > what I don't understand is how this example works, taking into account > the LGB rule. I thought that s is not accessible from bar, but

Re: Why does reply to messages on this list put the sender in the To

2005-07-12 Thread Rocco Moretti
Peter Decker wrote: > On 7/12/05, Dark Cowherd <[EMAIL PROTECTED]> wrote: > > >>Most lists when i hit reply it puts the list address back in the To >>address and some lists allow you to configure this. >> >>But in this list reply sends the mail back as a private mail and there >>seems to be no op

Re: Porting from Python 2.3 to 2.4

2005-07-14 Thread Rocco Moretti
Joseph Garvin wrote: > Anand wrote: > >> Hi >> >> Are there any tools that would help in porting code from >> Pyton 2.3 to 2.4 ? I have gone through the whatsnew documents >> and created a document comparing Python 2.4 to 2.3. But so far >> has not been able to find any tool that will signal cod

Re: all possible combinations

2005-07-14 Thread Rocco Moretti
rbt wrote: > Say I have a list that has 3 letters in it: > > ['a', 'b', 'c'] > > I want to print all the possible 4 digit combinations of those 3 > letters: When I have occasion to do an iteration of iterations, I either use recursion (already posted) or use an accumulator type loop: items = [

Re: python certification

2005-07-18 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: > i want to get a small certificate or diploma in python. > it should be online cuz i live in pakistan and wont have teast centers > near me. > it should be low cost as i am not rich. > and hopefully it would be something like a a begginer certification cuz > i am new to py

Re: goto

2005-07-19 Thread Rocco Moretti
Leif K-Brooks wrote: > rbt wrote: > >>IMO, most of the people who deride goto do so because they heard or read >>where someone else did. > > > 1 GOTO 17 > 2 mean,GOTO 5 > 3 couldGOTO 6 > 4 with GOTO 7 > 5 what GOTO 3 > 6 possibly GOTO 24 > 7 you!

Re: Documentation bug: Python console behaviour changed

2005-07-19 Thread Rocco Moretti
Tim Golden wrote: > Usually means you have a readline package installed: Should the readline package be twiddled to change the "quit" string in builtins to document the correct behavior? -- http://mail.python.org/mailman/listinfo/python-list

Re: goto

2005-07-21 Thread Rocco Moretti
> My "favorite" infinte loop with while is: > >i = 0 >while i < 20: > do_process(i) > > Note the prominent *lack* of any change to i here? > > Oh, for: > > from i = 0 > invariant 0 <= i <= 20 > variant 21 - i > until i > 19 > loop > do_process(i) >

Re: SciPy and NetCDF

2005-07-26 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: > I am going to be doing a lot of work with large data sets stored in > various netCDF files, and after checking out the alternatives, I would > really like to go with SciPy. The problem is that SciPy offers no > native netCDF support. You may be having an issue because t

Re: SciPy and NetCDF

2005-07-27 Thread Rocco Moretti
Scott Kilpatrick wrote: > So wherever pycdf does a: > > from Numeric import * > > what is the equivalent for SciPy? i.e. where is the full Numeric module > in SciPy? Python packages are in a pretty flat hierarchy. There really isn't a "SciPy Numeric" and a "pycdf Numeric" - Numeric, as an indep

Re: On fighting fire with fire...

2005-07-28 Thread Rocco Moretti
projecktzero wrote: > but..but...It's so much more fun to unleash your anger and fire back > with all guns blazing fanning the flame war that most discussion groups > degenerate into after a couple of responses. =) > > Actually, I had some self restraint yesterday. I wanted to write a > ripping re

Re: On fighting fire with fire...

2005-07-28 Thread Rocco Moretti
Asad Habib wrote: > I agree with Mustafa. After all, we are a bunch of professionals and not > vagabonds hired to take pot shots at one another. Except that we're not all professionals. There are a large number of hobbyists who use Python and this list. At any rate, my suggestion was not to fors

Re: On fighting fire with fire...

2005-07-29 Thread Rocco Moretti
Asad Habib wrote: > Well, even if you are a hobbyist, that does not excuse you from being > civil. After all, we are all humans beings that deserve to be treated with > respect. Professional, hobbyist, vagabond, ogre, instigator, troll ... > THERE IS NO EXCUSE ... please treat others with respect.

Re: Comparison of functions

2005-07-31 Thread Rocco Moretti
Adriano Varoli Piazza wrote: > As far as I recall from Math Analysis, which I studied two months ago, > you can't sort complex numbers. It makes no sense. The reason being > (reading from my book), it's not possible to define an order that > preserves the properties of arithmetical operations o

Re: Passing arguments to function - (The fundamentals are confusing me)

2005-08-09 Thread Rocco Moretti
Christopher Subich wrote: > Gregory Piñero wrote: > >> Hey guys, would someone mind giving me a quick rundown of how >> references work in Python when passing arguments into functions? The >> code below should highlight my specific confusion: This URL is always tossed out: http://starship.pytho

Re: Passing arguments to function - (The fundamentals are confusing me)

2005-08-09 Thread Rocco Moretti
Gregory Piñero wrote: > Ahh, so it's a mutable thing. That makes sense that I can't change a > mutable object and thus can't affect it outside of the function. If you meant "immutable" for the second mutable, you're right. > Does > that mean Python functions aren't always byref, but are someti

Re: Passing arguments to function - (The fundamentals are confusing me)

2005-08-09 Thread Rocco Moretti
Dennis Lee Bieber wrote: > On Tue, 09 Aug 2005 10:39:29 -0500, Rocco Moretti > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > >>Change it to "the object referenced by y is assigned to the name of x", >>and you're closer to th

Re: Passing arguments to function - (The fundamentals are confusing me)

2005-08-09 Thread Rocco Moretti
Christopher Subich wrote: > Rocco Moretti wrote: > >> Variables in Python are names. They aren't the cubbyholes into which >> you put values, they are sticky notes on the front of the cubby hole. > > > +1 MOTW (Metaphor of the Week) Thanks, but please note it&

Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-15 Thread Rocco Moretti
Cameron Laird wrote: > Andy Smith rails against "frameworks": > http://an9.org/devdev/why_frameworks_suck?sxip-homesite=&checked=1 > Slapdash Summary: Libraries good, frameworks bad - they are a straightjackets and limit sharing. Which lead me to the question - what's the dif

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-15 Thread Rocco Moretti
Simon Brunning wrote: > On 8/15/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > >>Which lead me to the question - what's the difference between a library >>and a framework? > > > If you call its code, it's a library. If it calls yours, it's a fra

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-16 Thread Rocco Moretti
Simon Brunning wrote: > On 8/15/05, Terry Hancock <[EMAIL PROTECTED]> wrote: > >>On Monday 15 August 2005 09:54 am, Simon Brunning wrote: >> >>>If you call its code, it's a library. If it calls yours, it's a framework. >> >>Such concision deserves applause. ;-) > > > Thank you. ;-) > > As other

Re: Module Name Conflicts

2005-08-19 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: > I have a java program in a package called 'cmd'. This of course > conflicts with the builtin python package of the same name. The thing > is, I need to be able to import from both of these packages in the same > script. I can import either one first, but any future attemp

Re: OpenSource documentation problems

2005-09-01 Thread Rocco Moretti
Steve Holden wrote: > Every page of the docs links to "About this document", which contains > the following: """If you are able to provide suggested text, either to > replace existing incorrect or unclear material, or additional text to > supplement what's already available, we'd appreciate the

Re: Well, Python is hard to learn...

2005-09-01 Thread Rocco Moretti
wen wrote: > due to the work reason, i have to learn python since last month. i have > spent 1 week on learning python tutorial and felt good. but i still don't > understand most part of sourcecode of PYMOL(http://pymol.sourceforge.net/) > as before. Well, last time I checked, a good chunk of PyMo

Re: 'isa' keyword

2005-09-02 Thread Rocco Moretti
Terry Hancock wrote: > On Thursday 01 September 2005 07:28 am, Fuzzyman wrote: > >>What's the difference between this and ``isinstance`` ? > > I must confess that an "isa" operator sounds like it would > have been slightly nicer syntax than the isinstance() built-in > function. But not enough nic

Re: 'isa' keyword

2005-09-05 Thread Rocco Moretti
Colin J. Williams wrote: > Rocco Moretti wrote: > >> Terry Hancock wrote: >> >>> On Thursday 01 September 2005 07:28 am, Fuzzyman wrote: >>> >>>> What's the difference between this and ``isinstance`` ? >>> >>> I must confess t

Re: Replacement for lambda - 'def' as an expression?

2005-09-06 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: > On Tue, 06 Sep 2005 12:19:21 +0200 > Torsten Bronger wrote: > > >>"talin at acm dot org" <[EMAIL PROTECTED]> writes: >> >>>Anyway, here's an example, then, of how 'def' could be used: >>> >>>add = def( a, b ): >>> return a + b >> >>I'm really not an expert in function

Re: Removing duplicates from a list

2005-09-14 Thread Rocco Moretti
Rubinho wrote: > I can't imagine one being much faster than the other except in the case > of a huge list and mine's going to typically have less than 1000 > elements. To add to what others said, I'd imagine that the technique that's going to be fastest is going to depend not only on the lengt

Re: Software bugs aren't inevitable

2005-09-14 Thread Rocco Moretti
Terry Reedy wrote: > But that, I admit, would be an invalid conclusion. And that, I claim, is > also invalid when 'iteration' and 'recursion' are reversed, no matter how > often repeated in texts and articles. The difference is between the > algorithms, not the differing syntactic expressions

Re: How to tell if an exception has been caught ( from inside the exception )?

2005-09-22 Thread Rocco Moretti
Paul Dale wrote: > > Hi everyone, > > I'm writing an exception that will open a trouble ticket for certain > events. Things like network failure. I thought I would like to have it > only open a ticket if the exception is not caught. Is there a way to do > this inside the Exception? As far as I

Re: Indexed variables

2005-09-22 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: > So how do I define the function such as to discrimate wheter I call it by > f(a1) or f(a2) ? I don't want to sound rude, but I think you'll be better served by telling us why you would want to do such a thing - ten to one someone can suggest a better way to acomplish

Re: Why doesn't join() call str() on its arguments?

2005-02-19 Thread Rocco Moretti
Jeff Shannon wrote: news.sydney.pipenetworks.com wrote: Fredrik Lundh wrote: a certain "princess bride" quote would fit here, I think. I'm not really familiar with it, can you enlighten please. (Taking a guess at which quote /F had in mind...) Vezzini: "Inconceivable!" Inigo:"You keep using th

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2004-12-02 Thread Rocco Moretti
For some reason I can't seem to make use of the google links. When I use the above eg http://groups.google.com/groups?frame=right&th=e562a771d1c827c9 I get a not found google page with url http://groups-beta.google.com/groups?frame=right&th=e562a771d1c827c9 really wanted to spell file in a sickl

Re: How did you learn Python?

2004-12-03 Thread Rocco Moretti
Shawn Milo wrote: > How did you learn Python? > I was just wondering what the best books were for learning Python. If you're open to options besides ink-on-tree, this is how I did it: I read the official tutorial, trying stuff out in the interactive interpreter when I didn't get something/had ques

Re: Optional Static Typing

2004-12-23 Thread Rocco Moretti
John Roth wrote: One of the comments on Artima asks a rather profound question: static typing is an answer. What's the question? (That's a paraphrase.) The answer that everyone seems to give is that it prevents errors and clarifies the program. It might just be me, but I thought it was to simpl

Re: Optional Static Typing

2004-12-23 Thread Rocco Moretti
John Roth wrote: "Rocco Moretti" <[EMAIL PROTECTED]> wrote > Looking at C, it's doubtful error prevention and program clarification was a serious objective in the static typing system. It's more reasonable to conclude that C is statically typed because it allows

Re: argument type

2004-12-28 Thread Rocco Moretti
"It's me" wrote: > No, that was just an example. I actually have additional arguments > that are similar to arg2. It's not like I can do: > > def abc(arg1, arg3, *arg2s, *arg3s, *arg4s) ... Now, what if arg2 is not a string but either a number or a bunch of numbers? Using your method, can I

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: Why tuples use parentheses ()'s instead of something else like <>'s? > > Please enlighten me as I really want to know. So to summarize: Commas define tuples, except when they don't, and parentheses are only required when they are necessary. I hope that clears up any confu

Re: Compiled bytecode

2004-12-30 Thread Rocco Moretti
Peter Hansen wrote: The main script is generally not compiled, but all imported scripts are generally compiled automatically, the first time they are imported, and never again unless the source changes. Someone please correct me if I'm wrong, but I'm under the impression that the main script *is*

Re: Grouping code by indentation - feature or ******?

2005-03-25 Thread Rocco Moretti
Antoon Pardon wrote: I have problems with all languages currently available, so I use those which rub me wrong the least. ... [I]t doesn't weight heavy enough to go and use an other language, although I keeping looking at the other languages. I think the operational definition of a "zealot" is som

  1   2   >