Re: Atoms, Identifiers, and Primaries

2013-04-18 Thread rusi
On Apr 18, 4:40 am, Mark Janssen dreamingforw...@gmail.com wrote: On Tue, Apr 16, 2013 at 8:55 PM, rusi rustompm...@gmail.com wrote: Circular just means recursive and recursion is the bedrock for language-design. Rercursion the bedrock of language-design.  I don't think so. Imperative

Re: Encoding NaN in JSON

2013-04-18 Thread Roland Koebler
On Thu, Apr 18, 2013 at 11:46:37AM +1000, Chris Angelico wrote: Wait... you can do that? It's internal to iterencode, at least in Python 3.3 and 2.7 that I'm looking at here. In Python 2.6 it wasn't internal to iterencode; in Python 2.7 and 3.x you probably would have to monkey-patch iterencode.

Re: Novice Issue

2013-04-18 Thread Wolfgang Maier
Bradley Wright bradley.wright.biz at gmail.com writes: Good Day all, currently writing a script that ask the user for three things; 1.Name 2.Number 3.Description I've gotten it to do this hurah! print Type \q\ or \quit\ to quit while raw_input != quit or q: print name =

Re: Novice Issue

2013-04-18 Thread Chris Angelico
On Thu, Apr 18, 2013 at 6:58 PM, Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de wrote: There are two solutions for that: the obvious: while not (raw_input == quit or raw_input == q) That has another problem: Once that's changed to raw_input() so it actually requests input, it will do so

Good python testing book

2013-04-18 Thread BhanuKumarRamappa
Hi All, Greetings.. can anyone please suggest me good python automation testing book . to develop automation tests. Thanks, -Bhanu -- http://mail.python.org/mailman/listinfo/python-list

Re: Good python testing book

2013-04-18 Thread xiaohanyu1988
On Thursday, April 18, 2013 4:46:16 PM UTC+8, BhanuKumarRamappa wrote: Hi All, Greetings.. can anyone please suggest me good python automation testing book . to develop automation tests. Thanks, -Bhanu Maybe you can try Python Testing Cookbook for a basic testing in

Re: Novice Issue

2013-04-18 Thread Mark Lawrence
On 18/04/2013 05:06, Bradley Wright wrote: Good Day all, currently writing a script that ask the user for three things; 1.Name 2.Number 3.Description I've gotten it to do this hurah! print Type \q\ or \quit\ to quit You've had a couple of answers already so I'll just point out that the above

Re: Parsing soap result

2013-04-18 Thread Ombongi Moraa Fe
Hi Burak, Team, Your solution worked perfectly thanks. Could you share the logic of this solution? Saludos Ombongi Moraa Faith On 18 April 2013 00:41, Burak Arslan burak.ars...@arskom.com.tr wrote: On 04/17/13 16:50, Ombongi Moraa Fe wrote: My client.service.gere(ri) method call

Re: Parsing soap result

2013-04-18 Thread Burak Arslan
Hi, On 04/18/13 13:46, Ombongi Moraa Fe wrote: Hi Burak, Team, Apparently I was too deep in answering support questions for my company :) This is python-list, so It's just me here :) Your solution worked perfectly thanks. Could you share the logic of this solution? You're using

Re: Novice Issue

2013-04-18 Thread Bradley Wright
On Thursday, April 18, 2013 12:06:59 AM UTC-4, Bradley Wright wrote: Good Day all, currently writing a script that ask the user for three things; 1.Name 2.Number 3.Description I've gotten it to do this hurah! print Type \q\ or \quit\ to quit while raw_input != quit or q:

Re: Novice Issue

2013-04-18 Thread Dave Angel
On 04/18/2013 08:18 AM, Bradley Wright wrote: SNIP Secondly, thanks Wolfgang while raw_input not in (quit, q) - genius, i get your point clearly But you have to combine his point with Chris's, don't forget the parens on the call to raw_input. And if it were I, I'd also put a prompt

Re: Novice Issue

2013-04-18 Thread Bradley Wright
On Thursday, April 18, 2013 12:06:59 AM UTC-4, Bradley Wright wrote: Good Day all, currently writing a script that ask the user for three things; 1.Name 2.Number 3.Description I've gotten it to do this hurah! print Type \q\ or \quit\ to quit while raw_input != quit or q:

Re: dynamic forms generation

2013-04-18 Thread Wayne Werner
On Tue, 16 Apr 2013, andrea crotti wrote: This is not really scalable, and we want to make the whole thing more generic. So ideally there could be a DSL (YAML or something else) that we could define to then generate the forms, but the problem is that I'm quite sure that this DSL would soon

Re: a couple of things I don't understand wrt lists

2013-04-18 Thread aaB
Hello, I am still in the process of writing preliminary code for my CA project. I am now running into a behavior that I can't explain. Here is a script which, at least on my system, shows the issue (python2.7 on a linux system). The final project will be wrapping these functions (and others)

Re: a couple of things I don't understand wrt lists

2013-04-18 Thread Dave Angel
On 04/18/2013 09:01 AM, aaB wrote: Hello, I am still in the process of writing preliminary code for my CA project. I am now running into a behavior that I can't explain. Here is a script which, at least on my system, shows the issue (python2.7 on a linux system). The final project will be

Re: anyone know pandas ? Don't understand error: NotImplementedError...

2013-04-18 Thread Wayne Werner
On Wed, 17 Apr 2013, someone wrote: File /usr/lib/pymodules/python2.7/pandas/tseries/offsets.py, line 214, in rule_code raise NotImplementedError NotImplementedError Can anyone tell why this error appears and how to fix it? I don't know anything about pandas, but my

Re: a couple of things I don't understand wrt lists

2013-04-18 Thread aaB
The second guess, more likely, is that you're using is to compare numbers, and that's never a safe idea. It might happen to work for small numbers, but you should be using ==. The second guess was right, changing is for == solved it, thanks. I still have a lot to learn about python semantics.

Re: Encoding NaN in JSON

2013-04-18 Thread Wayne Werner
On Wed, 17 Apr 2013, Miki Tebeka wrote: I'm trying to find a way to have json emit float('NaN') as 'N/A'. No. There is no way to represent NaN in JSON. It's simply not part of the specification. I know that. I'm trying to emit the *string* 'N/A' for every NaN. Why not use `null` instead?

Working with lists within Dictionaries

2013-04-18 Thread inshu chauhan
Hello Everyone, I am trying to work with lists and dictionaries together. In the following code I have to access pixels in a segmented image through a dictionary. But the problem is when I am trying to update the list through dict it is giving me this error of tuple, ofcourse because list indices

Re: anyone know pandas ? Don't understand error: NotImplementedError...

2013-04-18 Thread Neil Cerutti
On 2013-04-18, Wayne Werner wa...@waynewerner.com wrote: On Wed, 17 Apr 2013, someone wrote: File /usr/lib/pymodules/python2.7/pandas/tseries/offsets.py, line 214, in rule_code raise NotImplementedError NotImplementedError Can anyone tell why this error appears

Re: Novice Issue

2013-04-18 Thread John Gordon
In 0fa050c1-3a00-4c17-9fa6-b79a22485...@googlegroups.com Bradley Wright bradley.wright@gmail.com writes: while raw_input != quit or q: Others have pointed out flaws in this statement. However, even if you had written the loop the 'correct' way: user_input = raw_input() while

Re: a couple of things I don't understand wrt lists

2013-04-18 Thread Chris Angelico
On Thu, Apr 18, 2013 at 11:01 PM, aaB mecagonoisic...@gmail.com wrote: def get_index(thisgen, i): n = len(thisgen)-1 cell = thisgen[i] if i is 0: print i==0 prev, next = thisgen[n], thisgen[i+1] elif i is n: print i==%d % n prev, next = thisgen[i-1], thisgen[0]

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

2013-04-18 Thread James Jong
Thanks so much Chris. This is part of a super computer and I am afraid I don't have access to a machine with sudo permissions and similar architecture OS. Is there any way to active higher level of verbosity during the build process to identify what is failing? Or anything specifically I should

Re: Working with lists within Dictionaries

2013-04-18 Thread Chris Angelico
On Thu, Apr 18, 2013 at 11:58 PM, inshu chauhan insidesh...@gmail.com wrote: segments.setdefault(reg_num, [])[point] += point Not sure what your desired structure is. This is seeking to add the point to something indexed by the point; perhaps you simply want to append to the list itself?

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

2013-04-18 Thread Chris Angelico
On Fri, Apr 19, 2013 at 12:37 AM, James Jong ribonucle...@gmail.com wrote: Thanks so much Chris. This is part of a super computer and I am afraid I don't have access to a machine with sudo permissions and similar architecture OS. Do you know what the OS is, at least? Can you, for instance,

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

2013-04-18 Thread Jason Swails
On Thu, Apr 18, 2013 at 10:37 AM, James Jong ribonucle...@gmail.com wrote: Thanks so much Chris. This is part of a super computer and I am afraid I don't have access to a machine with sudo permissions and similar architecture OS. Is there any way to active higher level of verbosity during

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

2013-04-18 Thread James Jong
Thanks Jason. I have pinpointed the location of the error to a very specific gcc line. I am reproducing the error below (very easy to read): I run: == export CPPFLAGS='-I/opt/sqlite-3.7.16.2/include -I/opt/tk8.6.0/include

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Michael Torrie
On 04/16/2013 04:38 PM, Mark Janssen wrote: (Note this contrasts starkly with Java(script), which doesn't seem to be based on anything -- can anyone clarify where Java actually comes from?) Java is not equal in any way with JavaScript. The only thing they share are semicolons and braces.

Re: Atoms, Identifiers, and Primaries

2013-04-18 Thread rusi
On Apr 17, 11:43 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: You won't gain that from the *grammar* of the language. Grammar is only part of the story, and in some ways, the least important part. If I tell you that the grammar of English includes: ADJECTIVE NOUN that

equivalent to C pointer

2013-04-18 Thread abdelkader belahcene
Hi everybody, I am new to python and I am discovering it. I know C well, and want to know if python knows how to manage Pointers like pointer to function here is a C example how to write it in python Intergration with trapeze method When we write Trapeze ( at the compilation level) we don't

Re: equivalent to C pointer

2013-04-18 Thread Karim
Hello, There is no such notion in python. But the closest are iterators and generator functions. Cheers Karim On 18/04/2013 19:06, abdelkader belahcene wrote: Hi everybody, I am new to python and I am discovering it. I know C well, and want to know if python knows how to manage Pointers

Re: equivalent to C pointer

2013-04-18 Thread Chris Kaynor
While Python does not have pointers, Python functions are objects, and they may be passed like any other object: def F1(x): return x * x def Trapeze(Fonc, left, right, step): ...code... Y1 = Fonc(X1) ...code... def main(): ...code... y = Trapeze(F1, -2.5, 3.2, 0.1)

Re: equivalent to C pointer

2013-04-18 Thread abdelkader belahcene
Thanks for answer, but with C we can compile the trapeze function and put it in librairy, If we try to save the trapeze alone in package to import it later, I think, I am not sure it will be refused because F1 and sin are not define !!! this is the power of the C pointers !!! the link is

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Neil Cerutti
On 2013-04-18, Michael Torrie torr...@gmail.com wrote: On 04/16/2013 04:38 PM, Mark Janssen wrote: (Note this contrasts starkly with Java(script), which doesn't seem to be based on anything -- can anyone clarify where Java actually comes from?) Java is not equal in any way with JavaScript.

Re: equivalent to C pointer

2013-04-18 Thread David Robinow
On Thu, Apr 18, 2013 at 1:06 PM, abdelkader belahcene abelahc...@gmail.comwrote: Hi everybody, I am new to python and I am discovering it. I know C well, and want to know if python knows how to manage Pointers like pointer to function here is a C example how to write it in python

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

2013-04-18 Thread James Jong
All I finally solved the problem. The problem was that setup.py tests loading the dynamic library libtk (this I don't understand, since I though Python would statically link against TCL, TK and SQLITE. Either way, I have updated the thread at StackOverflow with the answer:

Re: equivalent to C pointer

2013-04-18 Thread Neil Cerutti
On 2013-04-18, abdelkader belahcene abelahc...@gmail.com wrote: Thanks for answer, but with C we can compile the trapeze function and put it in librairy, If we try to save the trapeze alone in package to import it later, I think, I am not sure it will be refused because F1 and sin are not

Re: equivalent to C pointer

2013-04-18 Thread David Robinow
On Thu, Apr 18, 2013 at 1:50 PM, abdelkader belahcene abelahc...@gmail.comwrote: Thanks for answer, but with C we can compile the trapeze function and put it in librairy, If we try to save the trapeze alone in package to import it later, I think, I am not sure it will be refused because

Re: equivalent to C pointer

2013-04-18 Thread Ian Kelly
On Thu, Apr 18, 2013 at 11:50 AM, abdelkader belahcene abelahc...@gmail.com wrote: Thanks for answer, but with C we can compile the trapeze function and put it in librairy, If we try to save the trapeze alone in package to import it later, I think, I am not sure it will be refused because

Re: anyone know pandas ? Don't understand error: NotImplementedError...

2013-04-18 Thread someone
On 04/18/2013 03:44 PM, Wayne Werner wrote: On Wed, 17 Apr 2013, someone wrote: File /usr/lib/pymodules/python2.7/pandas/tseries/offsets.py, line 214, in rule_code raise NotImplementedError NotImplementedError Can anyone tell why this error appears and how to fix it?

Re: equivalent to C pointer

2013-04-18 Thread Tim Chase
On 2013-04-18 18:07, Neil Cerutti wrote: There's no linking stage in Python. Everything you use must be defined before you use it. must be defined, only if you don't want an error. But in python, it isn't even REQUIRED that it be defined: some_undefined_function(args go here) will bomb out

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Jason Wilkins
Warning, this is a bit of a rant. That paragraph from Wikipedia seems to be confused. It gives the fourth paradigm as declarative but then says first order logic for logic programming. It seems somebody did an incomplete replacement of declarative for logic. Wikipedia is often schizophrenic

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

2013-04-18 Thread Terry Jan Reedy
On 4/18/2013 12:24 PM, James Jong wrote: After compiling, you might want to run the test suite. libtk8.6.so http://libtk8.6.so I do not know that Python/_tkinter/tkinter has been very well tested, certainly not on all systems, with the newish tcl/tk 8.6, as opposed to 8.5.z used for

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

2013-04-18 Thread James Jong
Thanks Terry. I run the tcl tests and passed them all. There was only one tk test that I think I didn't pass. One thing I don't understand is that I thought that Python would statically link against sqlite and tcl/tk (I presume that this is the reason why you said I could build it in a similar

Re: anyone know pandas ? Don't understand error: NotImplementedError...

2013-04-18 Thread someone
On 04/18/2013 04:07 PM, Neil Cerutti wrote: On 2013-04-18, Wayne Werner wa...@waynewerner.com wrote: On Wed, 17 Apr 2013, someone wrote: Go to line 214, and take a look-see at what you find. My guess is it will be something like: def rule_code(): raise NotImplementedError()

Re: equivalent to C pointer

2013-04-18 Thread abdelkader belahcene
Thanks a lot, I think this does the task cheers On Thu, Apr 18, 2013 at 7:14 PM, David Robinow drobi...@gmail.com wrote: On Thu, Apr 18, 2013 at 1:50 PM, abdelkader belahcene abelahc...@gmail.com wrote: Thanks for answer, but with C we can compile the trapeze function and put it in

Strange behavior for a 2D list

2013-04-18 Thread Robrecht W. Uyttenhove
Hello, I tried out the following code: y=[range(0,7),range(7,14),range(14,21),range(21,28),range(28,35)] y [[0, 1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12, 13], [14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27], [28, 29, 30, 31, 32, 33, 34]] y[1:5:2][::3] [[7, 8, 9, 10, 11, 12, 13]]

Re: Strange behavior for a 2D list

2013-04-18 Thread Peter Otten
Robrecht W. Uyttenhove wrote: Hello, I tried out the following code: y=[range(0,7),range(7,14),range(14,21),range(21,28),range(28,35)] y [[0, 1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12, 13], [14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27], [28, 29, 30, 31, 32, 33, 34]]

Re: Strange behavior for a 2D list

2013-04-18 Thread John Gordon
In mailman.793.1366317327.3114.python-l...@python.org Robrecht W. Uyttenhove ruyttenh...@gmail.com writes: I tried out the following code: y=[range(0,7),range(7,14),range(14,21),range(21,28),range(28,35)] y [[0, 1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12, 13], [14, 15, 16, 17, 18, 19, 20],

Re: Strange behavior for a 2D list

2013-04-18 Thread Wolfgang Maier
Robrecht W. Uyttenhove ruyttenhove at gmail.com writes: Hello, I tried out the following code:y=[range(0,7),range(7,14),range(14,21),range(21,28),range(28,35)] y[[0, 1, 2, 3, 4, 5, 6],  [7, 8, 9, 10, 11, 12, 13], [14, 15, 16, 17, 18, 19, 20],  [21, 22, 23, 24, 25, 26, 27],  [28,

How to set my gui?

2013-04-18 Thread Tracubik
Hi all! I'm trying to make a simple program that essentially do this: 1) open a html file (extracted epub file) 2) search for occurrences like ita-ly 3) put them on a simple GUI: 1 text field and two buttons: keepy it and correct it (i.e. it will become italy) now this is quite simple but how

Re: How to set my gui?

2013-04-18 Thread John Gordon
In 5170648d$0$1368$4fafb...@reader2.news.tin.it Tracubik affdfsdfds...@b.com writes: i suppose i've to first generate the window and than populate it, but where i've to put the search for occurences code? I don't think init() is the right place.. What GUI library are you using? -- John

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Robert Harper
In short, there is no such thing as a paradigm. I agree fully. This term is a holdover from the days when people spent time and space trying to build taxonomies based on ill-defined superficialities. See Steve Gould's essay What, If Anything, Is A Zebra?. You'll enjoy learning that there

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Robert Harper
The term declarative never meant a damn thing, but was often used, absurdly, to somehow lump together functional programming with logic programming, and separate it from imperative programming. It never made a lick of sense; it's just a marketing term. Bob Harper On Apr 18, 2013, at 2:48 PM,

Re: Strange behavior for a 2D list

2013-04-18 Thread Wim R. Cardoen
Thank you all for your replies. I had the matrix concept in mind such as explained in the numpy example. Rob On Thu, Apr 18, 2013 at 3:19 PM, Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de wrote: Robrecht W. Uyttenhove ruyttenhove at gmail.com writes: Hello, I tried out the

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

2013-04-18 Thread Terry Reedy
On 4/18/2013 3:21 PM, James Jong wrote: Thanks Terry. I run the tcl tests and passed them all. There was only one tk test that I think I didn't pass. One thing I don't understand is that I thought that Python would statically link against sqlite and tcl/tk (I presume that this is the reason

Re: How to set my gui?

2013-04-18 Thread Tracubik
On 18/04/2013 23:27, John Gordon wrote: In 5170648d$0$1368$4fafb...@reader2.news.tin.it Tracubik affdfsdfds...@b.com writes: i suppose i've to first generate the window and than populate it, but where i've to put the search for occurences code? I don't think init() is the right place.. What

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

2013-04-18 Thread Chris Angelico
On Fri, Apr 19, 2013 at 6:34 AM, Terry Reedy tjre...@udel.edu wrote: On 4/18/2013 3:21 PM, James Jong wrote: Thanks Terry. I run the tcl tests and passed them all. There was only one tk test that I think I didn't pass. One thing I don't understand is that I thought that Python would

Re: How to set my gui?

2013-04-18 Thread Chris Angelico
On Fri, Apr 19, 2013 at 7:36 AM, Tracubik affdfsdfds...@b.com wrote: On 18/04/2013 23:27, John Gordon wrote: In 5170648d$0$1368$4fafb...@reader2.news.tin.it Tracubik affdfsdfds...@b.com writes: i suppose i've to first generate the window and than populate it, but where i've to put the

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Mark Janssen
On Mon, Apr 15, 2013 at 2:53 AM, Moez AbdelGawad moeza...@outlook.com wrote: I'm not quite sure I understand your question, but I'll give it a shot. :-) I'm in this same camp too :) I am very thankful for the references given by everyone. Unfortunately my library does not have the titles and

Re: How to set my gui?

2013-04-18 Thread Walter Hurry
On Fri, 19 Apr 2013 08:00:11 +1000, Chris Angelico wrote: But 1 Corinthians 13:11 You are grown up now, I surmise. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to set my gui?

2013-04-18 Thread Chris Angelico
On Fri, Apr 19, 2013 at 8:57 AM, Walter Hurry walterhu...@lavabit.com wrote: On Fri, 19 Apr 2013 08:00:11 +1000, Chris Angelico wrote: But 1 Corinthians 13:11 You are grown up now, I surmise. :) Born in 1984, so that'll give you some idea where I was in the 1990s. ChrisA --

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Ian Kelly
On Thu, Apr 18, 2013 at 4:53 PM, Mark Janssen dreamingforw...@gmail.com wrote: The main thing that I notice is that there is a heavy bias in academia towards mathematical models. I understand that Turing Machines, for example, were originally abstract computational concepts before there was

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Steven D'Aprano
On Thu, 18 Apr 2013 10:37:17 -0600, Michael Torrie wrote: For the record, JavaScript is what they call a prototype-based language. http://en.wikipedia.org/wiki/Prototype-based_programming. You can emulate an OOP system with a prototype-based language. Prototype languages *are* OOP. Note that

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Roy Smith
In article 51709740$0$29977$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 18 Apr 2013 10:37:17 -0600, Michael Torrie wrote: For the record, JavaScript is what they call a prototype-based language.

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Mark Janssen
One of the nice things about OOP is it means so many different things to different people. All of whom believe with religious fervor that they know the true answer. Here's a simple rule to resolve the ambiguity. Whoever publishes first, gets to claim origin of a word and its usage, kind of

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Ned Batchelder
On 4/18/2013 9:24 PM, Mark Janssen wrote: One of the nice things about OOP is it means so many different things to different people. All of whom believe with religious fervor that they know the true answer. Here's a simple rule to resolve the ambiguity. Whoever publishes first, gets to claim

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Mark Janssen
On Thu, Apr 18, 2013 at 7:10 PM, Ned Batchelder n...@nedbatchelder.com wrote: You won't solve the problem of confusing, ambiguous, or conflicting terminology by making up a rule. Object-oriented means subtly different things to different people. That's a problem, not a solution. It turns

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Ned Batchelder
On 4/18/2013 10:30 PM, Mark Janssen wrote: Okay, professor is it, master? What is your provenance anyway? I'm not a professor, I'm a software engineer. I'm just trying to help. You've made statements that strike me as half-informed. You're trying to unify concepts that perhaps can't or

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Steven D'Aprano
On Thu, 18 Apr 2013 19:30:39 -0700, Mark Janssen wrote: On Thu, Apr 18, 2013 at 7:10 PM, Ned Batchelder n...@nedbatchelder.com wrote: You won't solve the problem of confusing, ambiguous, or conflicting terminology by making up a rule. Object-oriented means subtly different things to

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread rusi
On Apr 19, 3:53 am, Mark Janssen dreamingforw...@gmail.com wrote: On Mon, Apr 15, 2013 at 2:53 AM, Moez AbdelGawad moeza...@outlook.com wrote: I'm not quite sure I understand your question, but I'll give it a shot. :-) I'm in this same camp too :) I am very thankful for the references

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Mark Janssen
The main thing that I notice is that there is a heavy bias in academia towards mathematical models. Yeah wonderful observation. Lets clean up! If I have a loop: while i len(a) and a[i] != x: i++ I need to understand that at the end of the loop: i = len(a) or a[i] == x and not i

Re: Encoding NaN in JSON

2013-04-18 Thread Tim Roberts
Miki Tebeka miki.teb...@gmail.com wrote: I'm trying to find a way to have json emit float('NaN') as 'N/A'. No. There is no way to represent NaN in JSON. It's simply not part of the specification. I know that. I'm trying to emit the *string* 'N/A' for every NaN. You understand that this

[issue17204] argparser's subparsers.add_parser() should accept an ArgumentParser

2013-04-18 Thread paul j3
paul j3 added the comment: The 'subparsers' object has a _parser_class attribute that is normally set to the class of the parent parser. In the attached file I create a class CustomParser(argparse.ArgumentParser) that makes a parser instance which copies all of the attributes of

[issue17532] IDLE: Always include Options menu on MacOSX

2013-04-18 Thread Guilherme Simões
Guilherme Simões added the comment: Hi Roger, I just signed the contributor agreement. Unfortunately, I can't test on older MacOS versions, but I also think it should work. -- ___ Python tracker rep...@bugs.python.org

[issue17786] Crash in test_ctypes.test_callbacks() on AMD64 NetBSD 5.1.2 [SB] 3.x

2013-04-18 Thread STINNER Victor
New submission from STINNER Victor: Fatal Python error: Segmentation fault Current thread 0x: File /home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/ctypes/test/test_as_parameter.py, line 87 in test_callbacks File

[issue17413] format_exception() breaks on exception tuples from trace function

2013-04-18 Thread ingrid
ingrid added the comment: Thank you, r.david.murray. I have updated the patch with your suggestions included. -- Added file: http://bugs.python.org/file29917/issue17413.patch ___ Python tracker rep...@bugs.python.org

[issue17787] Optimize pickling function dispatch in hot loops.

2013-04-18 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: In addition, we could bring back the switch dispatch based on the first letter of the type name. It does seem to speed up things as well but as much as the type cache optimization. -- nosy: +pitrou, serhiy.storchaka title: Optimize pickling

[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Eric Wieser
New submission from Eric Wieser: It would be nice if there was a `with` expression. Such that instead of: with open(...) as f: result = foo(f) One could write: result = foo(f) with open(...) as f This would be particularly useful in comprehensions. Instead of: files = {}

[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Eric Wieser
Changes by Eric Wieser wieser.eric+py...@gmail.com: -- components: +Interpreter Core ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17788 ___ ___

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2013-04-18 Thread Stijn Hoop
Stijn Hoop added the comment: OK, fair enough. From reading sources, it appears that hostname is using getaddrinfo(3) on kernelhostname with hints-ai_flags AI_CANONNAME, while Lib/socket.py simply uses gethostbyaddr(kernelhostname), and falls back on kernelhostname in case of errors.

[issue14910] argparse: disable abbreviation

2013-04-18 Thread Mark Lawrence
Mark Lawrence added the comment: Ping :) -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14910 ___ ___ Python-bugs-list

[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Berker Peksag
Berker Peksag added the comment: I think this needs to be discussed on python-ideas first. -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17788 ___

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2013-04-18 Thread Stijn Hoop
Stijn Hoop added the comment: Attached is a very lightly tested patch that matches hostname -f behaviour on my system. I suspect this should be OK but it definitely needs more testing than just my system... -- keywords: +patch Added file:

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2013-04-18 Thread R. David Murray
R. David Murray added the comment: The problem with your patch is that it changes the (effective) meaning of the 'name' parameter. Before the patch, name can be an IP address. After the patch, that will fail on Fedora. (It also fails on my Gentoo system). It is interesting to note, as

[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Eric V. Smith
Eric V. Smith added the comment: Indeed, this should be on python-ideas. Eric: can you start a thread over there? Thanks. -- nosy: +eric.smith resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker

[issue12713] argparse: allow abbreviation of sub commands by users

2013-04-18 Thread Mark Lawrence
Mark Lawrence added the comment: The latest patch seems okay to me. I've successfully applied it and ran the test suite and everything passed. Could someone please take a look with a view to getting this committed, thanks. -- nosy: +BreamoreBoy

[issue17787] Optimize pickling function dispatch in hot loops.

2013-04-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why did you add all those calls to PyMemoTable_Get? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17787 ___

[issue17760] No i18n of IDLE's interface in french

2013-04-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I strongly disagree with Ezio's argumentation here. If Kate and Firefox are internationalized, IDLE can very well be internationalized too. -- nosy: +pitrou resolution: rejected - stage: committed/rejected - status: closed - open

[issue17760] No i18n of IDLE's interface in french

2013-04-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: That said, this issue can be considered a duplicate of #17776. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17760 ___

[issue17741] event-driven XML parser

2013-04-18 Thread Eli Bendersky
Eli Bendersky added the comment: Antoine, the patch LGTM. There's some more cleaning that needs to be done in surrounding code, but I can do that later. Also I should probably update the documentation with a bit more details. Just add a NEWS entry when you commit. Thanks for working on this.

[issue17760] No i18n of IDLE's interface in french

2013-04-18 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - IDLE Internationalization ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17760

[issue17781] optimize compilation options

2013-04-18 Thread Christian Heimes
Christian Heimes added the comment: Here is a patch for -flto. You need to run autoconf to re-generate configure, too. -- keywords: +patch nosy: +christian.heimes Added file: http://bugs.python.org/file29920/lto_flag.patch ___ Python tracker

[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17788 ___ ___ Python-bugs-list mailing

[issue17781] optimize compilation options

2013-04-18 Thread Matthias Klose
Matthias Klose added the comment: the proposed patch is wrong. when linking with -flto, you should pass all the relevant CFLAGS to the linker as well. Also pass -fuse-linker-plugin. and this should be an opt-in, not the default. Depending on the architecture and the compiler version, -flto is

[issue13831] get method of multiprocessing.pool.Async should return full traceback

2013-04-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: Pickling an exception (assuming it works) does not capture the traceback. Doing so would be difficult/impossible since the traceback refers to a linked list of frames, and each frame has references to lots of other stuff like the code object, the global

[issue17135] imp doc should direct to importlib

2013-04-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8f15a46a8c76 by R David Murray in branch '3.3': #17135: Add note in imp to use importlib for new programs. http://hg.python.org/cpython/rev/8f15a46a8c76 -- ___ Python tracker rep...@bugs.python.org

[issue17776] IDLE Internationalization

2013-04-18 Thread Roger Serwy
Roger Serwy added the comment: Extensions would need to be modified to use the gettext module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17776 ___

[issue17135] imp doc should direct to importlib

2013-04-18 Thread R. David Murray
R. David Murray added the comment: Thanks, Kristian. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17135

[issue17177] Document/deprecate imp

2013-04-18 Thread R. David Murray
R. David Murray added the comment: The documentation deprecation has been added as part of issue 17135. Leaving this open to address Ezio's last comment. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

  1   2   3   >