Re: utf-8 and ctypes

2010-09-30 Thread Mark Tolonen
Brendan Miller catph...@catphive.net wrote in message news:aanlkti=2f3l++398st-16mpes8wzfblbu+qa8ztpa...@mail.gmail.com... 2010/9/29 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand: In message mailman.1132.1285714474.29448.python-l...@python.org, Brendan Miller wrote: It seems that

Re: Strong typing vs. strong testing

2010-09-30 Thread Keith Thompson
RG rnospa...@flownet.com writes: In article lnbp7g58b4@nuthaus.mib.org, Keith Thompson ks...@mib.org wrote: [...] Even here, maximum() did exactly what was asked of it. Of course. Computers always do only exactly what you ask of them. On this view there is, by definition, no such

Re: Strong typing vs. strong testing

2010-09-30 Thread TheFlyingDutchman
That argument can be made for dynamic language as well. If you write in dynamic language (e.g. python): def maximum(a, b):     return a if a b else b The dynamic language's version of maximum() function is 100% correct -- if you passed an uncomparable object, instead of a number, your

Re: Strong typing vs. strong testing

2010-09-30 Thread RG
In article lnr5gb4von@nuthaus.mib.org, Keith Thompson ks...@mib.org wrote: I'm not saying one should not use compile-time tools, only that one should not rely on them. Compiling without errors is not -- and cannot ever be -- be a synonym for bug-free. Agreed. (Though C does make

Re: Strong typing vs. strong testing

2010-09-30 Thread RG
In article slrnia86l9.2esf.usenet-nos...@guild.seebs.net, Seebs usenet-nos...@seebs.net wrote: On 2010-09-30, RG rnospa...@flownet.com wrote: Of course. Computers always do only exactly what you ask of them. On this view there is, by definition, no such thing as a bug, only

Re: Strong typing vs. strong testing

2010-09-30 Thread Nick
Ian Collins ian-n...@hotmail.com writes: On 09/30/10 05:57 PM, RG wrote: I'm not saying one should not use compile-time tools, only that one should not rely on them. Compiling without errors is not -- and cannot ever be -- be a synonym for bug-free. We is why wee all have run time tools

Re: bzr 2.2.1 released !

2010-09-30 Thread Vincent Ladeuil
Sridhar Ratnakumar sridh...@activestate.com writes: Hi, It seems that you forgot to update PyPI - which lists 2.1.0rc1 as the latest version. -srid This should be fixed now. Let us know if you encounter problems. Vincent --

Re: Strong typing vs. strong testing

2010-09-30 Thread Ian Collins
On 09/30/10 06:38 PM, Lie Ryan wrote: The /most/ correct version of maximum() function is probably one written in Haskell as: maximum :: Integer - Integer - Integer maximum a b = if a b then a else b Integer in Haskell has infinite precision (like python's int, only bounded by memory), but

Re: Strong typing vs. strong testing

2010-09-30 Thread TheFlyingDutchman
Yes.  Nonetheless, the maximum() function does exactly what it is intended to do *with the inputs it receives*.  The failure is outside the function; it did the right thing with the data actually passed to it, the problem was a user misunderstanding as to what data were being passed to

Re: System idle time under Linux

2010-09-30 Thread Lawrence D'Oliveiro
In message mailman.1165.1285772270.29448.python-l...@python.org, Hugo Léveillé wrote: Sorry, I am not a linux guy. Did not know it was a text file That’s why I said to check the proc(5) man page for further details. -- http://mail.python.org/mailman/listinfo/python-list

Re: Strong typing vs. strong testing

2010-09-30 Thread Paul Rubin
in C I can have a function maximum(int a, int b) that will always work. Never blow up, and never give an invalid answer. If someone tries to call it incorrectly it is a compile error. The second sentence is not disproved by a cast from one datatype to another (which changes the

Re: Strong typing vs. strong testing

2010-09-30 Thread Pascal J. Bourguignon
Ian Collins ian-n...@hotmail.com writes: On 09/30/10 06:38 PM, Lie Ryan wrote: The /most/ correct version of maximum() function is probably one written in Haskell as: maximum :: Integer - Integer - Integer maximum a b = if a b then a else b Integer in Haskell has infinite precision

Re: System idle time under Linux

2010-09-30 Thread Ifrit
Hugo Léveillé heeft het volgende neergekrabbeld: Thanks, will take a closer look on that But to get me started, how would you get, via python, the info from that From a unix command prompt use the cat command to view their contents. You'll notice that they plain text files with very

Re: System idle time under Linux

2010-09-30 Thread Ifrit
Ifrit heeft het volgende neergekrabbeld: Hugo Léveillé heeft het volgende neergekrabbeld: Thanks, will take a closer look on that But to get me started, how would you get, via python, the info from that From a unix command prompt use the cat command to view their contents. You'll

Re: Strong typing vs. strong testing

2010-09-30 Thread RG
In article 5bf24e59-1be0-4d31-9fa7-c03a8bf9b...@y12g2000prb.googlegroups.com, TheFlyingDutchman zzbba...@aol.com wrote: Yes.  Nonetheless, the maximum() function does exactly what it is intended to do *with the inputs it receives*.  The failure is outside the function; it did the right

Re: how to get partition information of a hard disk with python

2010-09-30 Thread Anssi Saari
Nobody nob...@nowhere.com writes: On Wed, 22 Sep 2010 00:31:04 +0200, Hellmut Weber wrote: I'm looking for a possibility to access the partiton inforamtion of a hard disk of my computer from within a python program. Have you considered parsing /proc/partitions? One could also just read the

Re: Strong typing vs. strong testing

2010-09-30 Thread TheFlyingDutchman
On Sep 30, 1:02 am, Paul Rubin no.em...@nospam.invalid wrote: in C I can have a function maximum(int a, int b) that will always work. Never blow up, and never give an invalid answer. If someone tries to call it incorrectly it is a compile error. The second sentence is not

Re: Strong typing vs. strong testing

2010-09-30 Thread Lie Ryan
On 09/30/10 16:09, TheFlyingDutchman wrote: That argument can be made for dynamic language as well. If you write in dynamic language (e.g. python): def maximum(a, b): return a if a b else b The dynamic language's version of maximum() function is 100% correct -- if you passed an

Re: Strong typing vs. strong testing

2010-09-30 Thread TheFlyingDutchman
On Sep 30, 1:40 am, RG rnospa...@flownet.com wrote: In article 5bf24e59-1be0-4d31-9fa7-c03a8bf9b...@y12g2000prb.googlegroups.com,  TheFlyingDutchman zzbba...@aol.com wrote: Yes.  Nonetheless, the maximum() function does exactly what it is intended to do *with the inputs it

Re: utf-8 and ctypes

2010-09-30 Thread Diez B. Roggisch
Brendan Miller catph...@catphive.net writes: 2010/9/29 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand: In message mailman.1132.1285714474.29448.python-l...@python.org, Brendan Miller wrote: It seems that characters not in the ascii subset of UTF-8 are discarded by c_char_p during the

install 3.1

2010-09-30 Thread roronron
My python installed but the gui gives me syntax error on any code I type or paste in. Newbie needs help. -- http://mail.python.org/mailman/listinfo/python-list

Re: install 3.1

2010-09-30 Thread Chris Rebert
On Thu, Sep 30, 2010 at 2:02 AM, roronron rbrown...@gmail.com wrote: My python installed but the gui gives me syntax error on any code I type or paste in. Newbie needs help. Post the full, exact text of the error message. See also: http://www.catb.org/esr/faqs/smart-questions.html Cheers,

Re: System idle time under Linux

2010-09-30 Thread John Pinner
On Sep 29, 7:36 pm, Hugo Léveillé hu...@fastmail.net wrote: Good point One I am looking for, is time since last user mouse or keyboard action. So I guess I am looking for the exact same thing a screensaver is looking for The command who -Hu). will give you idle time for each logged-in

Re: Strong typing vs. strong testing

2010-09-30 Thread Pascal Costanza
On 30/09/2010 08:09, TheFlyingDutchman wrote: That argument can be made for dynamic language as well. If you write in dynamic language (e.g. python): def maximum(a, b): return a if a b else b The dynamic language's version of maximum() function is 100% correct -- if you passed an

Re: Strong typing vs. strong testing

2010-09-30 Thread Ian Collins
On 09/30/10 09:02 PM, Paul Rubin wrote: int maximum(int a, int b); int foo() { int (*barf)() = maximum; return barf(3); } This compiles fine for me. Where is the cast? Where is the error message? Are you saying barf(3) doesn't call maximum? Try a language with

Re: how to get partition information of a hard disk with python

2010-09-30 Thread Nobody
On Thu, 30 Sep 2010 11:41:48 +0300, Anssi Saari wrote: I'm looking for a possibility to access the partiton inforamtion of a hard disk of my computer from within a python program. Have you considered parsing /proc/partitions? One could also just read the partition table directly, it's on

Re: Strong typing vs. strong testing

2010-09-30 Thread TheFlyingDutchman
in C I can have a function maximum(int a, int b) that will always work. Never blow up, and never give an invalid answer. Dynamic typed languages like Python fail in this case on Never blows up. How do you define Never blows up? Never has execution halt. I think a key reason in the

gedit 'External Tools' plugin hashlib weirdness

2010-09-30 Thread Joel Hedlund
I'm having a weird problem with the 'External Tools' plugin for gedit, that seems to get weirder the more I dig into it. When I start gedit by clicking a launcher (from the Ubuntu menu, panel or desktop) everything is dandy and the 'External Tools' plugin works as expected. When gedit is launched

Re: if the else short form

2010-09-30 Thread Sion Arrowsmith
Andreas Waldenburger use...@geekmail.invalid wrote: http://docs.python.org/release/3.1/reference/datamodel.html#the-standard-type-hierarchy [ ... ] Boolean values behave like the values 0 and 1, respectively, in almost all contexts, the exception being that when converted to a

will Gnome 3.0 kill pygtk?

2010-09-30 Thread Tracubik
Hi! It seem that the new version of gnome 3.0 will dismiss pygtk support. link: [1] http://live.gnome.org/TwoPointNinetyone/ (search killing pygtk) [2] http://live.gnome.org/GnomeGoals/PythonIntrospectionPorting i'm studying pygtk right now, am i wasting my time considering that my

Re: if the else short form

2010-09-30 Thread bruno.desthuilli...@gmail.com
On 29 sep, 19:20, Seebs usenet-nos...@seebs.net wrote: On 2010-09-29, Tracubik affdfsdfds...@b.com wrote: button = gtk.Button((False,, True,)[fill==True]) Oh, what a nasty idiom. Well, it's not very different from dict-based dispatch , which is the core of OO polymorphic dispatch in quite a

Re: System idle time under Linux

2010-09-30 Thread Hugo Léveillé
Ok after some testing, what the who -Hu is giving me is the idle time of each running open shell. The first line always return a ? as the IDLE time. ex: NAME LINE TIME IDLE PID COMMENT vg0619hl :0 2010-09-30 06:10 ? 13091 vg0619hl pts/1

sys.setrecursionlimit() and regular expressions

2010-09-30 Thread Santiago Caracol
Hello, in my program I use recursive functions. A recursion limit of 10 would be by far sufficient. Yet, I also use some (not very complicated) regular expressions, which only compile if I set the recursion limit to 100, or so. This means, of course, an unnecessary loss of speed. Can I use one

Re: PyCObject malloc creating memory leak

2010-09-30 Thread Tom Conneely
Thanks for your reply, you've given me plenty to think about On Sep 29, 11:51 pm, Antoine Pitrou solip...@pitrou.net wrote: My original plan was to have the data processing and data acquisition functions running in separate processes, with a multiprocessing.Queue for passing the raw data

Re: gedit 'External Tools' plugin hashlib weirdness

2010-09-30 Thread Joel Hedlund
bah, I meant to say I'm running a fully updated ubuntu lucid lynx (10.4). -- http://mail.python.org/mailman/listinfo/python-list

Re: sys.setrecursionlimit() and regular expressions

2010-09-30 Thread Peter Otten
Santiago Caracol wrote: in my program I use recursive functions. A recursion limit of 10 would be by far sufficient. Yet, I also use some (not very complicated) regular expressions, which only compile if I set the recursion limit to 100, or so. This means, of course, an unnecessary loss of

Re: sys.setrecursionlimit() and regular expressions

2010-09-30 Thread Santiago Caracol
Why do you think so? The recursion limit has no effect on the speed of your script. It's just a number that the interpreter checks against. Yes, sorry. I was just about to explain that. The 'of course' in my post was silly. In MY program, the recursion limit is relevant for performance,

Re: gedit 'External Tools' plugin hashlib weirdness

2010-09-30 Thread Peter Otten
Joel Hedlund wrote: I'm having a weird problem with the 'External Tools' plugin for gedit, that seems to get weirder the more I dig into it. When I start gedit by clicking a launcher (from the Ubuntu menu, panel or desktop) everything is dandy and the 'External Tools' plugin works as

Re: sequence multiplied by -1

2010-09-30 Thread Antoon Pardon
On Sun, Sep 26, 2010 at 03:20:18PM +, Grant Edwards wrote: On 2010-09-26, Paul Rubin no.em...@nospam.invalid wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: There's nothing obscure or unintuitive about spam*3 = spamspamspam, Why would it not be [spam,spam,spam] or

PyRTF object model

2010-09-30 Thread Rustom Mody
I am trying to use PyRTF. I gather that an RTF doc consists of a list of sections, a section consists of a list of paras, paras seem to be just text (not sure on that one) Some questions: When does one end one section and start another? How does one handle lists (as in numbered, bulleted etc)?

Re: sys.setrecursionlimit() and regular expressions

2010-09-30 Thread Peter Otten
Santiago Caracol wrote: Why do you think so? The recursion limit has no effect on the speed of your script. It's just a number that the interpreter checks against. Yes, sorry. I was just about to explain that. The 'of course' in my post was silly. In MY program, the recursion limit is

Re: Strong typing vs. strong testing

2010-09-30 Thread Nick Keighley
On 27 Sep, 20:29, p...@informatimago.com (Pascal J. Bourguignon) wrote: namekuseijin namekusei...@gmail.com writes: snip Fact is:  almost all user data from the external words comes into programs as strings.  No typesystem or compiler handles this fact all that graceful... I would even

Re: gedit 'External Tools' plugin hashlib weirdness

2010-09-30 Thread Joel Hedlund
How do I catch output to stdout/stderr when launching from a launcher? I added this to /usr/lib/gedit-2/plugins/externaltools/__init__.py: import sys f = open('/tmp/eraseme.txt', 'w') print f, The executable is %r. % sys.executable f.close() In both cases (launcher/termial) the contents of

Re: PyCObject malloc creating memory leak

2010-09-30 Thread Tom Conneely
I'm posting this last message as I've found the source of my initial memory leak problem, unfortunately it was an embarrassingly basic mistake. In my defence I've got a horrible cold, but I'm just making excuses. I begin by mallocing the memory, which gives me a pointer foo to that memory:

Re: toy list processing problem: collect similar terms

2010-09-30 Thread namekuseijin
On 29 set, 11:04, w_a_x_man w_a_x_...@yahoo.com wrote: On Sep 26, 9:24 am, p...@informatimago.com (Pascal J. Bourguignon) wrote: Xah Lee xah...@gmail.com writes: here's a interesting toy list processing problem. I have a list of lists, where each sublist is labelled by a number. I

Re: Strong typing vs. strong testing

2010-09-30 Thread Nick Keighley
On 30 Sep, 11:14, TheFlyingDutchman zzbba...@aol.com wrote: in C I can have a function maximum(int a, int b) that will always work. Never blow up, and never give an invalid answer. Dynamic typed languages like Python fail in this case on Never blows up. How do you define Never

Re: gedit 'External Tools' plugin hashlib weirdness

2010-09-30 Thread Joel Hedlund
FOUND IT! I added the line print f, '\n'.join(sorted(sys.path)) and diff:ed the files produced from terminal/launcher. When using the launcher, changes to PYTHONPATH done in ~/.bashrc are not picked up, and I apparently had an old reference to /usr/lib/ python2.4 sitting in there. Removed it,

Re: will Gnome 3.0 kill pygtk?

2010-09-30 Thread Neil Hodgson
Tracubik: i'm studying pygtk right now, am i wasting my time considering that my preferred platform is linux/gnome? I expect the dynamic binding will be very similar to the current static binding but easier to keep up-to-date. There's already some use of dynamic binding in the recent PyGTK

Re: gedit 'External Tools' plugin hashlib weirdness

2010-09-30 Thread Joel Hedlund
I guess the moral of the story is don't always dist-upgrade. Reformat once in a while to remove old forgotten garbage. Clear the blood clots from your systems, so to say. -- http://mail.python.org/mailman/listinfo/python-list

Re: will Gnome 3.0 kill pygtk?

2010-09-30 Thread Diez B. Roggisch
Tracubik affdfsdfds...@b.com writes: Hi! It seem that the new version of gnome 3.0 will dismiss pygtk support. link: [1] http://live.gnome.org/TwoPointNinetyone/ (search killing pygtk) [2] http://live.gnome.org/GnomeGoals/PythonIntrospectionPorting i'm studying pygtk right now, am i

Re: Python becoming orphaned over ssh

2010-09-30 Thread David
On Wed, Sep 29, 2010 at 6:49 PM, John Nagle na...@animats.com wrote:   Python's signal handling for multithread and multiprocess programs leaves something to be desired. Thanks for the confirmation (that I'm not missing something obvious). I've reported a bug for this behavior in the Python

Re: PyCObject malloc creating memory leak

2010-09-30 Thread Antoine Pitrou
On Thu, 30 Sep 2010 04:06:03 -0700 (PDT) Tom Conneely tom.conne...@gmail.com wrote: Thanks for your reply, you've given me plenty to think about On Sep 29, 11:51 pm, Antoine Pitrou solip...@pitrou.net wrote: My original plan was to have the data processing and data acquisition

Re: Strong typing vs. strong testing

2010-09-30 Thread Pascal Bourguignon
TheFlyingDutchman zzbba...@aol.com writes: In this example RG is passing a long literal greater than INT_MAX to a function that takes an int and the compiler apparently didn't give a warning about the change in value as it created the cast to an int, even with the option -Wall (all warnings).

Re: Clarification of notation

2010-09-30 Thread Bruce W.
So, this kind of notation would be different: args[0][2] verses args[[0][2]] the latter is multidimensional. Can you think of example of using this type of list? I don't know why this had me a bit confused. I've got to get into programming more... I had done more in the past. Bruce

Re: PyRTF object model

2010-09-30 Thread Eric Brunel
In article mailman.1203.1285848899.29448.python-l...@python.org, Rustom Mody rustompm...@gmail.com wrote: I am trying to use PyRTF. I gather that an RTF doc consists of a list of sections, a section consists of a list of paras, paras seem to be just text (not sure on that one) They also

Re: toy list processing problem: collect similar terms

2010-09-30 Thread namekuseijin
On 30 set, 09:35, namekuseijin namekusei...@gmail.com wrote: On 29 set, 11:04, w_a_x_man w_a_x_...@yahoo.com wrote: On Sep 26, 9:24 am, p...@informatimago.com (Pascal J. Bourguignon) wrote: Xah Lee xah...@gmail.com writes: here's a interesting toy list processing problem. I

Re: gedit 'External Tools' plugin hashlib weirdness

2010-09-30 Thread Peter Otten
Joel Hedlund wrote: FOUND IT! Heureka! I added the line print f, '\n'.join(sorted(sys.path)) and diff:ed the files produced from terminal/launcher. When using the launcher, changes to PYTHONPATH done in ~/.bashrc are not picked up, and I apparently had an old reference to /usr/lib/

Re: Strong typing vs. strong testing

2010-09-30 Thread Pascal Bourguignon
Nick Keighley nick_keighley_nos...@hotmail.com writes: On 27 Sep, 20:29, p...@informatimago.com (Pascal J. Bourguignon) wrote: If you start with the mindset of static type checking, you will consider that your types are checked and if the types at the interface of two modules matches you'll

Re: sequence multiplied by -1

2010-09-30 Thread Emile van Sebille
On 9/30/2010 5:10 AM Antoon Pardon said... On Sun, Sep 26, 2010 at 03:20:18PM +, Grant Edwards wrote: On 2010-09-26, Paul Rubinno.em...@nospam.invalid wrote: Steven D'Apranost...@remove-this-cybersource.com.au writes: There's nothing obscure or unintuitive about spam*3 = spamspamspam,

Re: Python becoming orphaned over ssh

2010-09-30 Thread Jean-Paul Calderone
On Sep 30, 9:08 am, David wizza...@gmail.com wrote: On Wed, Sep 29, 2010 at 6:49 PM, John Nagle na...@animats.com wrote:   Python's signal handling for multithread and multiprocess programs leaves something to be desired. Thanks for the confirmation (that I'm not missing something obvious).

Re: if the else short form

2010-09-30 Thread Emile van Sebille
On 9/30/2010 3:21 AM Sion Arrowsmith said... Andreas Waldenburgeruse...@geekmail.invalid wrote: http://docs.python.org/release/3.1/reference/datamodel.html#the-standard-type-hierarchy [ ... ] Boolean values behave like the values 0 and 1, respectively, in almost all contexts, the

Re: Determine sockets in use by python

2010-09-30 Thread Jean-Paul Calderone
On Sep 29, 4:08 pm, Jim Mellander jmellan...@lbl.gov wrote: On Wed, Sep 29, 2010 at 11:05 AM, Gary Herron gher...@digipen.edu wrote: On 09/29/2010 09:50 AM, Jim Mellander wrote: Hi: I'm a newbie to python, although not to programming.  Briefly, I am using a binding to an external

Re: Strong typing vs. strong testing

2010-09-30 Thread TheFlyingDutchman
If I had to choose between blow up or invalid answer I would pick invalid answer. there are some application domains where neither option would be viewed as a satisfactory error handling strategy. Fly-by-wire, petro- chemicals, nuclear power generation. Hell you'd expect better than

eval string

2010-09-30 Thread Brandon Harris
Needing to pass a string command into a third party program and having issues creating a string to do what I need. here's what I have so far. eval('import sys; sys.stderr.write(\'\n\n\nCompleted!!!\nCompleted!!!\nCompleted!!!\nCompleted!!!\nCompleted!!!\nCompleted!!!\n\n\n\');') Traceback

Re: Clarification of notation

2010-09-30 Thread Dave Angel
On 2:59 PM, Bruce W. wrote: So, this kind of notation would be different: args[0][2] verses args[[0][2]] the latter is multidimensional. Can you think of example of using this type of list? I don't know why this had me a bit confused. I've got to get into programming more... I had done

Re: eval string

2010-09-30 Thread Peter Otten
Brandon Harris wrote: Needing to pass a string command into a third party program and having issues creating a string to do what I need. here's what I have so far. eval('import sys; sys.stderr.write(\'\n\n\nCompleted!!!\nCompleted!!!\nCompleted!!!

Re: eval string

2010-09-30 Thread Thomas Jollans
On Thursday 30 September 2010, it occurred to Brandon Harris to exclaim: Needing to pass a string command into a third party program and having issues creating a string to do what I need. here's what I have so far. eval('import sys;

Re: Strong typing vs. strong testing

2010-09-30 Thread Nick Keighley
On 30 Sep, 15:24, TheFlyingDutchman zzbba...@aol.com wrote: If I had to choose between blow up or invalid answer I would pick invalid answer. there are some application domains where neither option would be viewed as a satisfactory error handling strategy. Fly-by-wire, petro-

Re: eval string

2010-09-30 Thread Peter Otten
Peter Otten wrote: exec 'import sys\nsys.stderr.write(completed!\n)' Oops, you need to escape the backslashes for newlines inside quotes inside quotes: exec 'import sys\nsys.stderr.write(completed!\\n)' completed! Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Strong typing vs. strong testing

2010-09-30 Thread Tim Bradshaw
On 2010-09-30 13:36:17 +0100, Nick Keighley said: there are some application domains where neither option would be viewed as a satisfactory error handling strategy. Fly-by-wire, petro- chemicals, nuclear power generation. Hell you'd expect better than this from your phone! People always give

Re: PyRTF object model

2010-09-30 Thread David Robinow
On Thu, Sep 30, 2010 at 8:14 AM, Rustom Mody rustompm...@gmail.com wrote: I am trying to use PyRTF. I gather that an RTF doc consists of a list of sections, a section consists of a list of paras, paras seem to be just text (not sure on that one) Some questions: When does one end one

Re: Strong typing vs. strong testing

2010-09-30 Thread Keith Thompson
RG rnospa...@flownet.com writes: [...] You can't have it both ways. Either I am calling it incorrectly, in which case I should get a compiler error, or I am calling it correctly, and I should get the right answer. That I got neither does in fact falsify the claim. The only way out of

Problems with wsgi Python3

2010-09-30 Thread hidura
Hello list, i had seriously troubles with the connection between a form and the wsgi, i' ve made an application on Python3 and was running perfectly but when i try to use the form to pass the data this can't be see on the server, so what is your recommendation?, i am open to all the ideas

Re: Problems with wsgi Python3

2010-09-30 Thread Diez B. Roggisch
hid...@gmail.com writes: Hello list, i had seriously troubles with the connection between a form and the wsgi, i' ve made an application on Python3 and was running perfectly but when i try to use the form to pass the data this can't be see on the server, so what is your recommendation?,

Re: Strong typing vs. strong testing

2010-09-30 Thread Seebs
On 2010-09-30, TheFlyingDutchman zzbba...@aol.com wrote: even with the option -Wall (all warnings). For various historical reasons, -Wall has the semantics you might expect from an option named -Wsome-common-warnings-but-not-others. -s -- Copyright 2010, all wrongs reversed. Peter Seebach /

Re: Strong typing vs. strong testing

2010-09-30 Thread Seebs
On 2010-09-30, RG rnospa...@flownet.com wrote: We lost some important context somewhere along the line: in C I can have a function maximum(int a, int b) that will always work. Never blow up, and never give an invalid answer. If someone tries to call it incorrectly it is a compile error.

Re: Strong typing vs. strong testing

2010-09-30 Thread Seebs
On 2010-09-30, Paul Rubin no.em...@nospam.invalid wrote: int maximum(int a, int b); int foo() { int (*barf)() = maximum; return barf(3); } This compiles fine for me. Where is the cast? On the first line of code inside foo(). Where is the error message? You

Re: Strong typing vs. strong testing

2010-09-30 Thread Seebs
On 2010-09-30, RG rnospa...@flownet.com wrote: You can't have it both ways. Either I am calling it incorrectly, in which case I should get a compiler error, You get a warning if you ask for it. If you choose to run without all the type checking on, that's your problem. -s -- Copyright

Re: Strong typing vs. strong testing

2010-09-30 Thread Seebs
On 2010-09-30, Pascal Bourguignon p...@invitado-174.medicalis.es wrote: Nick Keighley nick_keighley_nos...@hotmail.com writes: do you have any evidence that this is actually so? That people who program in statically typed languages actually are prone to this well it compiles so it must be

Re: Strong typing vs. strong testing

2010-09-30 Thread RG
In article lniq1n45ht@nuthaus.mib.org, Keith Thompson ks...@mib.org wrote: RG rnospa...@flownet.com writes: [...] You can't have it both ways. Either I am calling it incorrectly, in which case I should get a compiler error, or I am calling it correctly, and I should get the right

Re: Strong typing vs. strong testing

2010-09-30 Thread Peter Keller
In comp.lang.lisp TheFlyingDutchman zzbba...@aol.com wrote: More specifically, the claim made above: in C I can have a function maximum(int a, int b) that will always work. Never blow up, and never give an invalid answer. is false. ?And it is not necessary to invoke the vagaries of

Re: Strong typing vs. strong testing

2010-09-30 Thread Seebs
On 2010-09-30, Lie Ryan lie.1...@gmail.com wrote: On 09/30/10 16:09, TheFlyingDutchman wrote: Dynamic typed languages like Python fail in this case on Never blows up. How do you define Never blows up? I would say blow up would be raise an exception. Personally, I'd consider

Re: Strong typing vs. strong testing

2010-09-30 Thread RG
In article slrnia9dbo.2uqe.usenet-nos...@guild.seebs.net, Seebs usenet-nos...@seebs.net wrote: On 2010-09-30, RG rnospa...@flownet.com wrote: You can't have it both ways. Either I am calling it incorrectly, in which case I should get a compiler error, You get a warning if you ask for

Re: install 3.1

2010-09-30 Thread Chris Rebert
On Thu, Sep 30, 2010 at 4:16 PM, Chris Rebert c...@rebertia.com wrote: On Thu, Sep 30, 2010 at 2:02 AM, roronron rbrown...@gmail.com wrote: My python installed but the gui gives me syntax error on any code I type or paste in. Newbie needs help. Post the full, exact text of the error

Please help: pylint does not work with Emacs23 on Windows

2010-09-30 Thread Dsrt Egle
Hi, I am trying to use Pylint with Emacs on Windows XP. My Emacs version is EmacsW32 23.1, pylint is 0.21.3 with Python 2.5. After easy_install pylint, I added the code block below to Emacs init file, copied form Emacs Wiki. (when (load flymake t) (defun flymake-pylint-init ()

Re: Strong typing vs. strong testing

2010-09-30 Thread RG
In article slrnia9cpd.2uqe.usenet-nos...@guild.seebs.net, Seebs usenet-nos...@seebs.net wrote: On 2010-09-30, Lie Ryan lie.1...@gmail.com wrote: On 09/30/10 16:09, TheFlyingDutchman wrote: Dynamic typed languages like Python fail in this case on Never blows up. How do you define Never

Re: Please help: pylint does not work with Emacs23 on Windows

2010-09-30 Thread Dsrt Egle
On Sep 30, 9:38 am, Dsrt Egle dsrte...@gmail.com wrote: Hi, I am trying to use Pylint with Emacs on Windows XP. My Emacs version is EmacsW32 23.1, pylint is 0.21.3 with Python 2.5. After easy_install pylint, I added the code block below to Emacs init file, copied form Emacs Wiki.     (when

Re: Strong typing vs. strong testing

2010-09-30 Thread Seebs
On 2010-09-30, RG rnospa...@flownet.com wrote: My code compiles with no warnings under gcc -Wall. That's nice. gcc -Wall uses only a small subset of warnings that fit the usual expectations of C code that's trying to work on common architectures. 2. The constant is not of type int, and the

namespace hacking question

2010-09-30 Thread kj
This is a recurrent situation: I want to initialize a whole bunch of local variables in a uniform way, but after initialization, I need to do different things with the various variables. What I end up doing is using a dict: d = dict() for v in ('spam', 'ham', 'eggs'): d[v] = init(v)

Re: install 3.1

2010-09-30 Thread Andreas Waldenburger
On Thu, 30 Sep 2010 09:39:08 -0700 Chris Rebert c...@rebertia.com wrote: On Thu, Sep 30, 2010 at 2:57 AM, ronald brown rbrown...@gmail.com wrote: print 'Hello, world!' SyntaxError: invalid syntax Installed 3 times. Used uninstall in program files and control panel. Followed directions

Re: namespace hacking question

2010-09-30 Thread bruno.desthuilli...@gmail.com
On 30 sep, 19:07, kj no.em...@please.post wrote: This is a recurrent situation: I want to initialize a whole bunch of local variables in a uniform way, but after initialization, I need to do different things with the various variables. What I end up doing is using a dict: d = dict() for v

Re: namespace hacking question

2010-09-30 Thread MRAB
On 30/09/2010 18:07, kj wrote: This is a recurrent situation: I want to initialize a whole bunch of local variables in a uniform way, but after initialization, I need to do different things with the various variables. What I end up doing is using a dict: d = dict() for v in ('spam', 'ham',

Re: problem in Gasp !

2010-09-30 Thread Cousin Stanley
n.a.s wrote: I want to ask about graphics using Gasp .Attached is exercise 10 (houses at night) http://openbookproject.net/thinkCSpy/ch04.html#exercises if i call the draw_house function once it will work properly ,but more than one call,windows and doors disappear from some houses .

Re: if the else short form

2010-09-30 Thread Andreas Waldenburger
On Thu, 30 Sep 2010 03:42:29 -0700 (PDT) bruno.desthuilli...@gmail.com bruno.desthuilli...@gmail.com wrote: On 29 sep, 19:20, Seebs usenet-nos...@seebs.net wrote: On 2010-09-29, Tracubik affdfsdfds...@b.com wrote: button = gtk.Button((False,, True,)[fill==True]) Oh, what a nasty idiom.

Re: Strong typing vs. strong testing

2010-09-30 Thread Scott L. Burson
Ian Collins wrote: On 09/30/10 05:57 PM, RG wrote: I'm not saying one should not use compile-time tools, only that one should not rely on them. Compiling without errors is not -- and cannot ever be -- be a synonym for bug-free. We is why we all have run time tools called unit tests, don't

Re: Strong typing vs. strong testing

2010-09-30 Thread RG
In article slrnia9fvi.307n.usenet-nos...@guild.seebs.net, Seebs usenet-nos...@seebs.net wrote: And that's the magic of static typing: It is not a false positive to warn you that 2L is not of type int. We'll have to agree to disagree about that. The numerical value 2 can safely be

Re: Strong typing vs. strong testing

2010-09-30 Thread Scott L. Burson
Pascal J. Bourguignon wrote: Squeamizhsque...@hotmail.com writes: In short, static typing doesn't solve all conceivable problems. We are all aware that there is no perfect software development process or tool set. I'm interested in minimizing the number of problems I run into during

Re: Strong typing vs. strong testing

2010-09-30 Thread Keith Thompson
Seebs usenet-nos...@seebs.net writes: On 2010-09-30, Paul Rubin no.em...@nospam.invalid wrote: int maximum(int a, int b); int foo() { int (*barf)() = maximum; return barf(3); } This compiles fine for me. Where is the cast? On the first line of code inside foo().

Re: Strong typing vs. strong testing

2010-09-30 Thread Paul Rubin
RG rnospa...@flownet.com writes: Yes, I know I could have used lint. But that misses the point. For any static analyzer, because of the halting problem, I can construct a program that either contains an error that the analyzer will not catch, or for which the analyzer will produce a false

Re: Strong typing vs. strong testing

2010-09-30 Thread Pascal J. Bourguignon
RG rnospa...@flownet.com writes: One might hypothesize that the best of both worlds would be a dynamic language with a static analyzer layered on top. Such a thing does not exist. It makes an instructive exercise to try to figure out why. (For the record, I don't know the answer, but

  1   2   3   >