Idea for key parameter in all() builting, would it be feasible?

2013-06-19 Thread russ . pobox
I was mucking around, trying to code a prime sieve in one line. I don't know about filters and bit shifting and stuff like that but I thought I could do it with builtins, albeit a very long one line. This is the part of my stupid trick in question that got me wondering about a key parameter for

Re: Idea for key parameter in all() builting, would it be feasible?

2013-06-19 Thread russ . pobox
>All you need is the iterator version of map(). In Python 3, that's the >normal map(); in Python 2, use this: from itertools import imap all(imap(lambda x: bool(x), xrange(10**9))) >False >It's roughly instant, like you would expect. >ChrisA This probably isn't the way to post a reply

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

2012-03-06 Thread Russ P.
On Mar 5, 10:34 pm, Xah Lee wrote: > On Mar 5, 9:26 pm, Tim Roberts wrote: > > > Xah Lee wrote: > > > >some additional info i thought is relevant. > > > >are int, float, long, double, side-effects of computer engineering? > > > Of course they are.  Such concepts violate the purity of a computer

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

2012-03-07 Thread Russ P.
On Mar 6, 7:25 pm, rusi wrote: > On Mar 6, 6:11 am, Xah Lee wrote: > > > some additional info i thought is relevant. > > > are int, float, long, double, side-effects of computer engineering? > > It is a bit naive for computer scientists to club integers and reals > as mathematicians do given that

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread Russ P.
On Apr 29, 5:17 pm, someone wrote: > On 04/30/2012 12:39 AM, Kiuhnm wrote: > > >> So Matlab at least warns about "Matrix is close to singular or badly > >> scaled", which python (and I guess most other languages) does not... > > > A is not just close to singular: it's singular! > > Ok. When do you

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread Russ P.
On May 1, 11:52 am, someone wrote: > On 04/30/2012 03:35 AM, Nasser M. Abbasi wrote: > > > On 04/29/2012 07:59 PM, someone wrote: > > I do not use python much myself, but a quick google showed that pyhton > > scipy has API for linalg, so use, which is from the documentation, the > > following code

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread Russ P.
On May 1, 4:05 pm, Paul Rubin wrote: > someone writes: > > Actually I know some... I just didn't think so much about, before > > writing the question this as I should, I know theres also something > > like singular value decomposition that I think can help solve > > otherwise illposed problems, >

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread Russ P.
On May 1, 11:03 pm, someone wrote: > On 05/02/2012 01:38 AM, Russ P. wrote: > > > > > > > > > > > On May 1, 4:05 pm, Paul Rubin  wrote: > >> someone  writes: > >>> Actually I know some... I just didn't think so much about, before &

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread Russ P.
On May 2, 1:29 pm, someone wrote: > > If your data starts off with only 1 or 2 digits of accuracy, as in your > > example, then the result is meaningless -- the accuracy will be 2-2 > > digits, or 0 -- *no* digits in the answer can be trusted to be accurate. > > I just solved a FEM eigenvalue pro

Re: numpy (matrix solver) - python vs. matlab

2012-05-03 Thread Russ P.
On May 3, 10:30 am, someone wrote: > On 05/02/2012 11:45 PM, Russ P. wrote: > > > > > On May 2, 1:29 pm, someone  wrote: > > >>> If your data starts off with only 1 or 2 digits of accuracy, as in your > >>> example, then the result is meaningless -

Re: numpy (matrix solver) - python vs. matlab

2012-05-03 Thread Russ P.
ather than empirical. Still, a condition number of 1e6 would bother me, but maybe that's just me. --Russ P. On May 3, 3:21 pm, someone wrote: > On 05/03/2012 07:55 PM, Russ P. wrote: > > > > > On May 3, 10:30 am, someone  wrote: > >> On 05/02/2012 11:45 PM, Russ P. wro

Re: numpy (matrix solver) - python vs. matlab

2012-05-03 Thread Russ P.
On May 3, 4:59 pm, someone wrote: > On 05/04/2012 12:58 AM, Russ P. wrote: > > > Yeah, I realized that I should rephrase my previous statement to > > something like this: > > > For any *empirical* engineering or scientific work, I'd say that a > > c

killing a script

2011-08-28 Thread Russ P.
and keeps running. If I hit Control-C repeatedly, I eventually get "lucky" and kill the top-level script. Is there a simple way to ensure that the first Control-C will kill the whole darn thing, i.e, the top-level script? Thanks. --Russ P. -- http://mail.python.org/mailman/listinfo/python-list

Re: killing a script

2011-08-28 Thread Russ P.
On Aug 28, 6:52 pm, MRAB wrote: > On 29/08/2011 02:15, Russ P. wrote:> I have a Python (2.6.x) script on Linux > that loops through many > > directories and does processing for each. That processing includes > > several "os.system" calls for each directory (s

Re: killing a script

2011-08-28 Thread Russ P.
On Aug 28, 7:51 pm, Chris Angelico wrote: > On Mon, Aug 29, 2011 at 12:41 PM, Russ P. wrote: > > On Aug 28, 6:52 pm, MRAB wrote: > >> You could look at the return value of os.system, which may tell you the > >> exit status of the process. > > > Thanks for t

Re: killing a script

2011-08-28 Thread Russ P.
On Aug 28, 8:16 pm, Chris Rebert wrote: > On Sun, Aug 28, 2011 at 8:08 PM, Russ P. wrote: > > On Aug 28, 7:51 pm, Chris Angelico wrote: > >> On Mon, Aug 29, 2011 at 12:41 PM, Russ P. wrote: > >> > On Aug 28, 6:52 pm, MRAB wrote: > >> >> You could

Re: killing a script

2011-08-29 Thread Russ P.
On Aug 28, 8:16 pm, Chris Rebert wrote: > On Sun, Aug 28, 2011 at 8:08 PM, Russ P. wrote: > > On Aug 28, 7:51 pm, Chris Angelico wrote: > >> On Mon, Aug 29, 2011 at 12:41 PM, Russ P. wrote: > >> > On Aug 28, 6:52 pm, MRAB wrote: > >> >> You could

A Pragmatic Case for Static Typing

2013-09-01 Thread Russ P.
I just stumbled across this video and found it interesting: http://vimeo.com/72870631 My apologies if it has been posted here already. -- http://mail.python.org/mailman/listinfo/python-list

Re: A Pragmatic Case for Static Typing

2013-09-02 Thread Russ P.
On Monday, September 2, 2013 1:10:34 AM UTC-7, Paul Rubin wrote: > "Russ P." writes: > > > I just stumbled across this video and found it interesting: > > > http://vimeo.com/72870631 > > > My apologies if it has been posted here already. > > >

Re: Controlling number of zeros of exponent in scientific notation

2013-03-06 Thread Russ P.
One possibility is to form the string as usual, split on the "e", format each part separately, then rejoin with an "e". On Tuesday, March 5, 2013 12:09:10 PM UTC-8, fa...@squashclub.org wrote: > Instead of: > > > > 1.8e-04 > > > > I need: > > > > 1.8e-004 > > > > So two zeros before t

IDLE

2007-11-02 Thread Russ P.
I've been programming in python for a few years using XEmacs on Solaris and Linux. I've been thinking about trying IDLE for a long time, but either it wasn't available on my system or I procrastinated. I finally have it available, and I gave it a try. I immediately encountered a basic problem for

Re: IDLE

2007-11-04 Thread Russ P.
On Nov 3, 1:43 am, [EMAIL PROTECTED] wrote: > Just curious: What makes you wish to move from emacs to idle? I don't necessarily want to move from xemacs to idle. I'm just getting tired of using print statements to debug, and I figure I'm well past the stage where I should still be doing that. If I

Re: IDLE

2007-11-04 Thread Russ P.
Thanks for the information on IDLE. > As for your question, I couldn't quite understand what you're trying > to do. In general, you can have the script use os.chdir() to go to the > relevant directory and then open() the file, or you can use open() > directly with a relative/full path to it. (This

command-line arguments in IDLE

2007-11-06 Thread Russ P.
Is it possible to pass command-line arguments when running a program in IDLE? The "Run" menu does not seem to provide that option. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

command-line arguments in IDLE

2007-11-07 Thread Russ P.
Is it possible to pass command-line arguments when running a program in IDLE? The "Run" menu does not seem to provide that option. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: "Python" is not a good name, should rename to "Athon"

2007-11-30 Thread Russ P.
On Nov 30, 6:58 am, [EMAIL PROTECTED] wrote: > Python is a good programming language, but "Python" is not a good > name. I agree that Python is not a good name for a programming language, but I'm afraid we're stuck with it. If I had invented Python, I would have called it Newton or Euler, arguab

Re: "Python" is not a good name, should rename to "Athon"

2007-12-01 Thread Russ P.
On Dec 1, 2:10 am, Bjoern Schliessmann wrote: > Russ P. wrote: > > I agree that Python is not a good name for a programming language, > > Why not? Think about proposing its use to someone who has never heard of it (which I did not too long ago). As the OP pointed out, a Python

Re: "Python" is not a good name, should rename to "Athon"

2007-12-01 Thread Russ P.
On Dec 1, 12:47 pm, "J. Clifford Dyer" <[EMAIL PROTECTED]> wrote: > On Sat, 2007-12-01 at 12:10 -0800, Russ P. wrote: > > On Dec 1, 2:10 am, Bjoern Schliessmann > [EMAIL PROTECTED]> wrote: > > > Russ P. wrote: > > > > I agree that Python is not

Re: "Python" is not a good name, should rename to "Athon"

2007-12-01 Thread Russ P.
> > Newton was a great scientist, and his name is easy to spell and > > pronounce. > > Should be, but a large proportion of the population pronounce it so > that it rhymes with "hootin" as in "hootin n hollerin" :-) You can count me in that large proportion. 8^) By the way, after thinking about

Re: "Python" is not a good name, should rename to "Athon"

2007-12-01 Thread Russ P.
On Dec 1, 4:57 pm, Bjoern Schliessmann wrote: > Tóth Csaba wrote: > > Lets evaluate from the Python3000: Newton3 (N3). > > > +1 vote from me :) > > Nah. Python is an "acceptable" name, but Newton1 (or Newton3) would be a great name. Shouldn't a great language have a great name? I think so. And I

Re: "Python" is not a good name, should rename to "Athon"

2007-12-01 Thread Russ P.
> Heck, lots of names are > take:http://en.wikipedia.org/wiki/Alphabetical_list_of_programming_languages I am surprised to see that Newton is not taken. I urge Guido to take it while it is still available. Sir Isaac certainly deserves the honor. -- http://mail.python.org/mailman/listinf

Re: "Python" is not a good name, should rename to "Athon"

2007-12-02 Thread Russ P.
On Dec 1, 11:34 pm, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Russ P." wrote: > > I am surprised to see that Newton is not taken. I urge > > Guido to take it while it is still available. Sir Isaac > > certainly deserves the honor. >

Re: "Python" is not a good name, should rename to "Athon"

2007-12-02 Thread Russ P.
> He might have been a great intellectual but he was no scientist. It's > only by ignoring the vast bulk of his work -- work which Newton himself > considered *far* more important and interesting than his work on physics > and mathematics -- that we can even *pretend* he was a scientist. The fact

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Russ P.
On Dec 3, 5:23 am, Steven D'Aprano > I'm not suggesting that Leibniz was any more of a scientist than Newton > was, nor am I suggesting that Newton's achievements should be *rejected* > (er, except for those pesky Quantum Mechanics and Relativity things...). > I'm just saying that we should unders

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Russ P.
On Dec 3, 8:22 am, [EMAIL PROTECTED] wrote: > The only reason to change the name would be because of some serious > bad PR that came onto Python, thus causing its branding name to be > catagorized as something bad. > > However this is not the case, presently, and the brand name is well > establishe

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Russ P.
> Python name is not funny for me. Even the Monty Python, because its hard > to translate their jokes, and in my country they are not so popular. > Just a few ppl knows them. I've heard it helps to be stoned out of your mind (i.e., under the influence of illegal drugs), but I don't necessarily re

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Russ P.
> I'm amazed that anyone here answered this obvious troll... I doubt the original post was a troll, but the statement above clearly is. You are entitled to your opinion about the idea of changing the name of the language, but calling it a troll is just arrogance on display. Python3000 is expect

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Russ P.
On Dec 3, 1:04 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Mon, 03 Dec 2007 16:11:19 +, Neil Cerutti wrote: > > To paraphrase Bertrand Russell, Newton was too successful. > > Over-veneration of Newton was eventually an impediment to progress--this > > was not, of cour

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Russ P.
On Dec 3, 1:47 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Bullshit. Nowadays, anyone serious (since you seem to worry quite a lot > about "being serious") about IT knows what Python is and who uses it. > Heck, even MSVS now has support for Python and there's an official CLR > port of it.

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Russ P.
On Dec 3, 2:12 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On Dec 3, 2007 4:02 PM, Russ P. <[EMAIL PROTECTED]> wrote: > > > On Dec 3, 1:47 pm, Bruno Desthuilliers > > <[EMAIL PROTECTED]> wrote: > > > > Bullshit. Nowadays, anyone serio

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Russ P.
On Dec 3, 1:58 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > ...and thus, maybe the joke is on you? Just to play devil's advocate... Yes, the joke *is* on me -- every time I have to explain to someone why I am using this funny-sounding language. That's the point. -- http://mail.python.org/mailma

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Russ P.
On Dec 3, 3:09 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > People who claim that everyone would agree with them if they'd only > open their minds or think out of the box are worth more than a few Never said anything like it. It's a red herring that you either imagined or made up. > points on

Re: "Python" is not a good name, should rename to "Athon"

2007-12-03 Thread Russ P.
On Dec 3, 2:40 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > Until the OP posted his lastest 'why', I assumed this proposal was an April > Fools' post that he just could not wait to post. In fact, given that the > effective cost would be in the $millions, I an still not sure he is sanely > seri

exception message output problem

2007-12-21 Thread Russ P.
I am baffled about why my exception messages are not displaying properly. I have a class that represents physical scalars with units. If I type >>> 3 * s + 4 * m I should get something like this: scalar.InconsistentUnits: 3 s, 4 m to show that seconds cannot be added to meters. Instead, the m

Re: exception message output problem

2007-12-21 Thread Russ P.
On Dec 21, 2:58 pm, Lie <[EMAIL PROTECTED]> wrote: > Change the exception into this: > class InconsistentUnits(Exception): > def __init__(self, args=""): self.args = (args,) > # Python have an odd (read: broken) singleton implementation > # single member tuple must have a comma behind it

Re: exception message output problem

2007-12-22 Thread Russ P.
On Dec 22, 5:34 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Russ P. wrote: > > Actually, the parens aren't needed, so this works too: > > > def __init__(self, args=""): self.args = args, > > > The trailing comma wasn't necessary a while

Re: stdin: processing characters

2006-05-01 Thread Russ Salsbury
uot;stty cooked") > IIRC You need to do "stty raw" first. The last time I had to do this was in the '80's, so take for what it's worth. Russ -- http://mail.python.org/mailman/listinfo/python-list

Re: Swaying A Coder Away From Python

2006-05-04 Thread Russ Salsbury
Adam Jones: """ User error, evidently. Sometimes the interface is more intelligent than its user, and every time this happens the interface is the one that gets the bad rap. """ Well that certainly explains my problems with Eclipse. -- http://mail.python.org/mailman/listinfo/python-list

Re: C++ equivalent of comp.lang.python?

2008-01-03 Thread Russ P.
On Jan 3, 9:39 am, [EMAIL PROTECTED] wrote: > Hopefully this isn't too OT. > > One thing I like about comp.lang.python is the breadth of topics > discussed here. People can ask about Python installation and > configuration issues on specific platforms, compare third party > libraries, ask for book

Re: How a smart editor could make "Postfix type declarations PEP3117" in Python3000 more readable

2008-01-04 Thread Russ P.
On Jan 4, 10:07 pm, John Nagle <[EMAIL PROTECTED]> wrote: > aspineux wrote: > > Hi > > > I read the PEP 3117 about the new "Postfix type declarations" in > > Python3000. > > THIS PEP as been REJECTED ! > > Of course. That was a joke. > > > And I think this is a good idea to include typing in

Re: Language type systems (was: How a smart editor could make "Postfix type declarations PEP3117" in Python3000 more readable)

2008-01-05 Thread Russ P.
Since > Python is strongly-typed and dynamically-typed, this > -- Hyphenating after "ly" is grammatically incorrect. > \"It is the responsibility of intellectuals to tell the truth | > `\and expose lies." -- Noam Chomsky Never quote Noam Chomsky on "tr

Re: use fileinput to read a specific line

2008-01-07 Thread Russ P.
On Jan 7, 7:15 pm, jo3c <[EMAIL PROTECTED]> wrote: > hi everybody > im a newbie in python > i need to read line 4 from a header file > using linecache will crash my computer due to memory loading, because > i am working on 2000 files each is 8mb > > fileinput don't load the file into memory first >

Re: use fileinput to read a specific line

2008-01-07 Thread Russ P.
> Given that the OP is talking 2000 files to be processed, I think I'd > recommend explicit open() and close() calls to avoid having lots of I/O > structures floating around... Good point. I didn't think of that. It could also be done as follows: for fileN in files: lnum = 0 # line

Re: use fileinput to read a specific line

2008-01-07 Thread Russ P.
On Jan 7, 9:41 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Mon, 7 Jan 2008 20:10:58 -0800 (PST), "Russ P." > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > for file0 in files: > > > lnum = 0 # line number >

Re: docstrings style question

2008-01-09 Thread Russ P.
On Jan 9, 9:47 pm, "Steve Brown" <[EMAIL PROTECTED]> wrote: > I've got a series of modules which look like this: > > # > # > # Temperature Sense Test > # > # > class Test3(ar_test.AR_TEST): > """Temperature Sense Test""" > > I don't like the duplicated information: But t

Re: docstrings style question

2008-01-10 Thread Russ P.
On Jan 9, 11:51 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Steve Brown wrote: > > I've got a series of modules which look like this: > > > # > > # > > # Temperature Sense Test > > # > > # > > class Test3(ar_test.AR_TEST): > > """Temperature Sense Test""" > > > I don'

Re: split parameter line with quotes

2008-01-11 Thread Russ P.
On Jan 11, 10:50 am, teddyber <[EMAIL PROTECTED]> wrote: > Hello, > > first i'm a newbie to python (but i searched the Internet i swear). > i'm looking for some way to split up a string into a list of pairs > 'key=value'. This code should be able to handle this particular > example string : > > qop

Re: split parameter line with quotes

2008-01-11 Thread Russ P.
On Jan 11, 12:53 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > On Jan 11, 10:50 am, teddyber <[EMAIL PROTECTED]> wrote: > > > Hello, > > > first i'm a newbie to python (but i searched the Internet i swear). > > i'm looking for some way to s

Re: Linux Journal Survey

2008-01-24 Thread Russ P.
On Jan 23, 7:42 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jan 23, 8:14 pm, [EMAIL PROTECTED] wrote: > > > The annual Linux Journal survey is online now for any Linux users who > > want to vote for Python. http://www.linuxjournal.com/node/1006101 > > ... > > 18. What is your favorite progra

optional static typing for Python

2008-01-27 Thread Russ P.
A while back I came across a tentative proposal from way back in 2000 for optional static typing in Python: http://www.python.org/~guido/static-typing Two motivations were given: -- faster code -- better compile-time error detection I'd like to suggest a third, which could help extend P

Re: optional static typing for Python

2008-01-27 Thread Russ P.
On Jan 27, 2:36 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Russ P. pisze: > > > I noticed that Guido has expressed further interest in static typing > > three or four years ago on his blog. Does anyone know the current > > status of this project? Thanks. > &g

Re: optional static typing for Python

2008-01-27 Thread Russ P.
On Jan 27, 2:49 pm, "André" <[EMAIL PROTECTED]> wrote: > On Jan 27, 6:19 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > > > > > A while back I came across a tentative proposal from way back in 2000 > > for optional static typing in Python: &

Re: optional static typing for Python

2008-01-27 Thread Russ P.
On Jan 27, 3:08 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Russ P. pisze: > > >>> I noticed that Guido has expressed further interest in static typing > >>> three or four years ago on his blog. Does anyone know the current > >>> status of this pr

Re: optional static typing for Python

2008-01-27 Thread Russ P.
On Jan 27, 5:03 pm, Paddy > If static typing is optional then a program written in a dynamic > language that passes such an automated static analysis of source code > would have to be a simple program written in a simplistic way, and > also in a static style. Yes, but for safety-critical software

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-27 Thread Russ P.
On Jan 27, 5:13 pm, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > Ben Finney wrote: > > "André" <[EMAIL PROTECTED]> writes: > > >> Personally, I like the idea you suggest, with the modification that I > >> would use "." instead of "@", as in > > >> class Server(object): > >> def __init__(s

Re: Python Standardization: Wikipedia entry

2008-01-27 Thread Russ P.
On Jan 27, 5:41 pm, Roy Smith <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, > > > > ajaksu <[EMAIL PROTECTED]> wrote: > > On Jan 27, 10:32 pm, Paddy <[EMAIL PROTECTED]> wrote: > > > I would value the opinion of fellow Pythoneers who have also > > > contributed to Wikipedia, on the

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-27 Thread Russ P.
On Jan 27, 7:33 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > "Russ P." <[EMAIL PROTECTED]> writes: > > On Jan 27, 5:13 pm, Wildemar Wildenburger > > <[EMAIL PROTECTED]> wrote: > > > class Server(object): > > > def __init__(self

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-28 Thread Russ P.
On Jan 27, 11:47 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Mon, 28 Jan 2008 08:04:05 +0100, Torsten Bronger wrote: > >> Are you referring to the alternate syntax or to the decorator? Either > >> way, you could be saving 4 or 5 or more lines, if you have enough > >> argu

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-28 Thread Russ P.
On Jan 28, 12:21 am, Ben Finney <[EMAIL PROTECTED]> wrote: > "Russ P." <[EMAIL PROTECTED]> writes: > > OK, then how about a special function that could be called from > > inside the constructor (or anywhere else for that matter) to > > initialize a li

Re: optional static typing for Python

2008-01-28 Thread Russ P.
On Jan 28, 1:53 am, Bruno Desthuilliers wrote: > Russ P. a écrit : > > > > > On Jan 27, 5:03 pm, Paddy > > >> If static typing is optional then a program written in a dynamic > >> language that passes such an automated static analysis of source code > &g

Re: optional static typing for Python

2008-01-28 Thread Russ P.
On Jan 28, 1:51 am, Bruno Desthuilliers wrote: > Russ P. a écrit :> A while back I came across a tentative proposal from way > back in 2000 > > for optional static typing in Python: > > (snip) > > > In any case, optional static typing in Python would help tremendou

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-12 Thread Russ P.
On Jan 12, 3:34 pm, Paul Rubin wrote: > r writes: > > Python and Ruby. Ruby only exists in this world because of the things > > it took from Python. Nobody would touch Ruby without it's Pythonisms. > > I confess to not knowing much about Ruby. It looks sort of Perl-

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-13 Thread Russ P.
On Jan 13, 9:47 am, Bruno Desthuilliers wrote: > Steven D'Aprano a écrit : > > > On Mon, 12 Jan 2009 13:36:07 -0800, Paul Rubin wrote: > > >> Bruno Desthuilliers writes: > >>> Why on earth are you using Python if you don't like the way it work ??? > >> Why on earth keep releasing new versions of

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-13 Thread Russ P.
On Jan 13, 3:07 pm, Carl Banks wrote: > I've seen no evidence that any Python project is moving even remotely > toward data encapsulation. That would be a drastic change. Even if > it were only a minor change in the implementation (and it would not > be), it would be a major stroke in the Pytho

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-13 Thread Russ P.
On Jan 13, 5:29 pm, alex23 wrote: > On Jan 14, 10:45 am, "Russ P." wrote: > > > The Wikipedia entry for "object-oriented programming" also lists > > encapsulation as a "fundamental concept." > > The Wikipedia entry for "encaps

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-13 Thread Russ P.
On Jan 13, 6:04 pm, "James Mills" wrote: > On Wed, Jan 14, 2009 at 11:50 AM, Russ P. wrote: > > Here's the definition on the Wikipedia page for object oriented > > programming (and it does *not* sound like Python classes): > > > Encapsulation conceals

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-13 Thread Russ P.
On Jan 13, 7:50 pm, Carl Banks wrote: > On Jan 13, 6:45 pm, "Russ P." wrote: > > > > > On Jan 13, 3:07 pm, Carl Banks wrote: > > > > I've seen no evidence that any Python project is moving even remotely > > > toward data encapsulation.  

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-13 Thread Russ P.
On Jan 13, 7:32 pm, "James Mills" wrote: > On Wed, Jan 14, 2009 at 1:18 PM, Russ P. wrote: > > Yes, but the fact that you can approximate OO programming in a > > particular language does not make that language object oriented. You > > can approximate OO programmi

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-13 Thread Russ P.
On Jan 13, 7:50 pm, Carl Banks wrote: > You know what?  Computer science buzzwords mean jack squat to me.  I > don't give a horse's tail whether some people label it a fundamental > concept of object-oriented programming or not.  I think it's a bad > thing.  And it's a bad thing for exactly the r

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Russ P.
On Jan 13, 11:51 pm, Paul Rubin wrote: > Carl Banks writes: > > At GE there was no encapsulation in sight on any system I worked on. > > In fact, our engine simulation was a special-purpose object-oriented > > language with--get this--no private variables.  Some othe

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Russ P.
On Jan 13, 11:40 pm, Steven D'Aprano wrote: > But, gosh darn it, wouldn't it be nice to program the critical parts of > your code in "strict Python", and leave the rest as "trusting Python", > instead of having to use Java for the lot just to get strictness in the > critical parts? If only there

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Russ P.
On Jan 14, 1:54 am, Carl Banks wrote: > I thought you were done wasting time with this nonsense. So did I. > > An engine *simulation* is one > > thing; the actual engine control code is another. > > Guess what systems I worked on that didn't even use scoping?  I wrote > code for the GP7000 (equ

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Russ P.
On Jan 14, 7:37 pm, Paul Rubin wrote: > "James Mills" writes: > > In fact, Python borrows features from the Functional Paradigm. Does > > this make it a Functional Language ? No. Why ? Because one of the > > clear requirements of the Functional Paradigm is that funct

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Russ P.
On Jan 14, 9:04 pm, "James Mills" wrote: > On Thu, Jan 15, 2009 at 2:50 PM, Russ P. wrote: > > (..) > > > One feature of Ada that I always thought was a good idea is the > > distinction between functions and procedures, where functions are > > guarante

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Russ P.
On Jan 14, 9:04 pm, "James Mills" wrote: Oh, by the way, please quit emailing me every time you reply to one of my posts. You're the only one here who does that, and it isn't necessary. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Russ P.
On Jan 14, 10:40 pm, "James Mills" wrote: > On Thu, Jan 15, 2009 at 4:34 PM, Michele > Simionato wrote: > > (...) > > > There are lots of Python developers (and most of the core developers) > > that think the OO community is wrong about enforced encapsulation. > > Personally, I think in a few yea

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Russ P.
On Jan 14, 9:51 pm, Michele Simionato wrote: > On Jan 13, 2:48 am, "Russ P." wrote: > > > I started looking at Scala a while back. It is has many nice features. > > It seamlessly combines object orientation with advanced functional > > programming. > > I

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-15 Thread Russ P.
On Jan 15, 12:21 pm, Bruno Desthuilliers wrote: > Once again, the important point is that there's a *clear* distinction > between interface and implementation, and that you *shouldn't* mess with > implementation. If you "*shouldn't* mess with the implementation", then what is wrong with enforcin

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-16 Thread Russ P.
On Jan 16, 5:22 am, Steve Holden wrote: > Russ P. wrote: > > [...] > > > I spent *way* too much time on that post. I really need to quit > > spending my time refuting the baloney that passes for wisdom here. > > He who cannot ignore baloney is doomed to r

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-17 Thread Russ P.
No one ever claimed that a programming language, no matter how rigorous, can eliminate all bugs. All a language can do is to reduce their rate of occurrence. The Ariane fiasco was not a failure of Ada per se but rather a failure of people using Ada. They attempted to re-use software written for on

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-17 Thread Russ P.
On Jan 17, 11:49 am, Bruno Desthuilliers wrote: > Please educate yourself and learn about why Ariane 5 crashed on it's > first flight, due to an error in a module written in ADA (which is such > a psychorigid language that C++ and Java are even looser than Javascript > in comparison). Perhaps wil

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-17 Thread Russ P.
On Jan 17, 1:43 pm, Paul Rubin wrote: > Bruno Desthuilliers writes: > > Once again, there's quite a lot to learn from > > the story of Ariane 5. > > Do you know what actually happened with Ariane 5?  The failure was > because "smart" humans overrode the language enfo

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-18 Thread Russ P.
Wow! That was an instant classic! I just have a couple of points to add. The suggestion was made (not by you) that data hiding is worthless because it can be defeated anyway. According to that kind of reasoning, locks are worthless because they can be picked, cut, or just blown off. I know that th

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-18 Thread Russ P.
On Jan 18, 9:22 am, Bruno Desthuilliers wrote: > Properties by themselves are not the problem, quite on the contrary - as > you say, they actually help wrt/ encapsulation. What breaks > encapsulation is *automatic generation* for properties for *each and > any* implementation attribute. Might as

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Russ P.
On Jan 19, 7:13 am, Bruno Desthuilliers wrote: > I must be missing the point : if it's a public attribute, it doesn't > need a "property" ? I guess we use the same words for different things here. Yes, you are missing more than one point. Scala automatically converts public data members into pr

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Russ P.
On Jan 19, 5:09 pm, Luis Zarrabeitia wrote: > Russ, I think _you_ are missing the point. > If the attribute is already public, why does it need properties? Why would a > programmer go to the trouble of adding them manually, just to get one level of > indirection for an already publ

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Russ P.
On Jan 19, 6:24 pm, Steven D'Aprano wrote: > On Mon, 19 Jan 2009 18:07:50 -0800, Russ P. wrote: > > On Jan 19, 5:09 pm, Luis Zarrabeitia wrote: > > >> Russ, I think _you_ are missing the point. If the attribute is already > >> public, why does it need propertie

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Russ P.
On Jan 19, 6:24 pm, Steven D'Aprano wrote: > On Mon, 19 Jan 2009 18:07:50 -0800, Russ P. wrote: > > On Jan 19, 5:09 pm, Luis Zarrabeitia wrote: > > >> Russ, I think _you_ are missing the point. If the attribute is already > >> public, why does it need propertie

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Russ P.
On Jan 19, 6:24 pm, "James Mills" wrote: > Python programmers tend to not have a need for > properties. Quite honestly they are a waste of time. > They come from traditional OO approaches to software design > (and mostly from the Java world). With statements like that, it's no wonder you don't u

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-19 Thread Russ P.
On Jan 19, 7:44 pm, wrote: > >> Because frankly, that's how I read Russ' explanation for what Scala is > >> doing. Have I missed something? > > coz he gets paid per line of code > > it's a mindless way of getting paid more for the same functio

<    1   2   3   4   >