Re: [correction]an oop question

2022-11-02 Thread Julieta Shem
Dennis Lee Bieber writes: > On 2 Nov 2022 09:56:28 GMT, r...@zedat.fu-berlin.de (Stefan Ram) declaimed > the following: > > >> Now, in the next program, I have removed the subclassings, >> there is no inheritance from the base class "Language" >> anymore. Yet the polymorphism in "f" still work

Re: [correction]an oop question

2022-11-02 Thread Alan Gauld
On 02/11/2022 20:21, Dennis Lee Bieber wrote: >> shows that in Python we do *not* need subclassing/inheritance >> for polymorphism! >> > To me, that is not really an example of polymorphism, but more an > example of Python's "duck typing". But duck typing is a perfectly good implementatio

Re: Any better way for this removal? [typo correction]

2020-11-07 Thread Tim Chase
On 2020-11-07 10:51, Tim Chase wrote: > from string import ascii_lowercase > text = ",".join(ascii_lowercase) > to_throw_away = 5 [derp] For obvious reasons, these should be s/\/to_throw_away/g To throw away the trailing N delimited portions: > new_string = text.rsplit(',', n)[0] new

Re: Robot Drift correction help

2019-11-06 Thread Isaiah Foss
Any pointers or help is appreciated, I'm not necessarily asking for answers but any response is appreciated -- https://mail.python.org/mailman/listinfo/python-list

Robot Drift correction help

2019-11-06 Thread Isaiah Foss
We have a robot needed coding, we succeeded however the left wheel has an issue with drift. This was compiled by a professor that requires drift correction. He is overseas and uncontactable the code is as follows. define a procedure to recalibrate rotational speeds when any wheel can be

Correction of announcement of Version 2 of a steganographical software of mine

2017-04-06 Thread Mok-Kong Shen
Due to a new convention of my Internet provider, my current home page is now: http://mokkong-shen.homepage.t-online.de M. K. Shen -- https://mail.python.org/mailman/listinfo/python-list

Re: issue with csv module (subject module name spelling correction, too)

2016-03-11 Thread Martin A. Brown
Good afternoon Fillmore, import csv s = '"Please preserve my doublequotes"\ttext1\ttext2' reader = csv.reader([s], delimiter='\t') > How do I instruct the reader to preserve my doublequotes? Change the quoting used by the dialect on the csv reader instance: reader = csv.reader

Re: Writing list of dictionaries to CSV [correction]

2015-05-06 Thread Tim Chase
On 2015-05-06 20:22, Tim Chase wrote: > As ChrisA posted earlier, you have to use Excel's Import > functionality (there are several ways to get this wizard, but not > all ways of opening a .csv trigger the wizard), then specify those > particular columns as "Text" rather than "General" Sorry, it w

typo correction

2014-08-04 Thread Peter Tomcsanyi
Now I see that I wrote a quite unreadable typo: "unterd". I meant "untared". Peter Tomcsanyi -- https://mail.python.org/mailman/listinfo/python-list

Re: Input without line break, is it possible? [correction]

2013-12-04 Thread Tim Chase
On 2013-12-04 09:55, Tim Chase wrote: > You could make it a bit more robust with something like: > > answers = [] > while len(answers) < 8: > s = input() > answers.append(s.split()) this should be answers.extend(s.split()) instead of .append() That's what I get for coding in my i

Re: Found a grammar error in PEP 5. How to suggest correction?

2013-08-20 Thread Aseem Bansal
@ Terry Jan Reedy, @Joel Goldstick The problem with that documentation link is that it says the bugs in that documentation should be mailed at that e-mail address. But the PEPs are not the part of the documentation. I am saying that PEPs are not its part because when I downloaded the documentat

Re: Found a grammar error in PEP 5. How to suggest correction?

2013-08-20 Thread Joel Goldstick
On Tue, Aug 20, 2013 at 4:05 PM, Terry Reedy wrote: > On 8/20/2013 1:14 PM, Aseem Bansal wrote: >> >> In PEP 5 it is >> >> 4. Add an an optional warning mode to the parser that will inform >> >> There are 2 `an`s here. > > > Fixed. > > >&

Re: Found a grammar error in PEP 5. How to suggest correction?

2013-08-20 Thread Terry Reedy
On 8/20/2013 1:14 PM, Aseem Bansal wrote: In PEP 5 it is 4. Add an an optional warning mode to the parser that will inform There are 2 `an`s here. Fixed. How to suggest a correction for this? You just did. If this list does not work, or for non-trivial suggestions, go to bugs.python.org

Re: Found a grammar error in PEP 5. How to suggest correction?

2013-08-20 Thread Aseem Bansal
@Joel Goldstick That is the documentation and this is about the PEP. I didn't realize that the same works for both. I'll do that. -- http://mail.python.org/mailman/listinfo/python-list

Re: Found a grammar error in PEP 5. How to suggest correction?

2013-08-20 Thread Joel Goldstick
On Tue, Aug 20, 2013 at 1:14 PM, Aseem Bansal wrote: > In PEP 5 it is > > 4. Add an an optional warning mode to the parser that will inform > > There are 2 `an`s here. How to suggest a correction for this? > -- > http://mail.python.org/mailman/listinfo/python-list You alread

Found a grammar error in PEP 5. How to suggest correction?

2013-08-20 Thread Aseem Bansal
In PEP 5 it is 4. Add an an optional warning mode to the parser that will inform There are 2 `an`s here. How to suggest a correction for this? -- http://mail.python.org/mailman/listinfo/python-list

Re: There must be a better way (correction)

2013-04-23 Thread Tim Chase
On 2013-04-23 09:30, Tim Chase wrote: > > But a csv.DictReader might still be more efficient. I never > > tested. This is the only place I've used this "optimization". > > It's fast enough. ;) > > I believe the csv module does all the work at c-level, rather than > as pure Python, so it should be

Bias correction using histogram matching

2013-01-04 Thread user123
I am trying to do the histogram matching of the simulated data to the observed data. The aim is to correct the bias in the simulated data by CDF matching CDFobs(y) = CDFsim(x). I could only reach to the stage of generating the CDFs. I got stuck in finding the transfer function. The image shows

Re: A very minute correction on PDF

2011-05-04 Thread Terry Reedy
On 5/4/2011 3:45 AM, Mehta, Pratik wrote: For tutorialPython.pdf Page 17 of the ebook (i.e. page 23 of pdf) under topic *3.2 First Steps towards programming* Under while loop, there should be a “,” after print b Print b, (a comma after ‘b’ is missing) [You should mention versions when posting

A very minute correction on PDF

2011-05-04 Thread Mehta, Pratik
For tutorialPython.pdf Page 17 of the ebook (i.e. page 23 of pdf) under topic 3.2 First Steps towards programming Under while loop, there should be a "," after print b Print b, (a comma after 'b' is missing) Regards, __ [cid:i

Correction

2010-06-27 Thread Jimmy
It should be "PresentationCore" and "PresentationFramework." For some reason, that first part got deleted in my reply. Jimmy Cao wrote: Wrong reference 27-Jun-10 Add references to: "PresentationCore" and "PresentationFramework" for the System.Windows and System.Windows.Controls etc namespace.

Re: Executable problem - correction

2010-02-24 Thread Gib Bogle
Sean DiZazzo wrote: On Feb 24, 9:22 pm, Gib Bogle wrote: The program doesn't fail with the write error on the other XP machine, it actually fails to execute at all, complaining about the configuration information. Therefore I'm seeing different behaviour on three XP machines: Box 1 (SP2): run

Re: Executable problem - correction

2010-02-24 Thread Sean DiZazzo
On Feb 24, 9:22 pm, Gib Bogle wrote: > The program doesn't fail with the write error on the other XP machine, it > actually fails to execute at all, complaining about the configuration > information.  Therefore I'm seeing different behaviour on three XP machines: > > Box 1 (SP2): runs OK > Box 2 (

Re: Executable problem - correction

2010-02-24 Thread Gib Bogle
The program doesn't fail with the write error on the other XP machine, it actually fails to execute at all, complaining about the configuration information. Therefore I'm seeing different behaviour on three XP machines: Box 1 (SP2): runs OK Box 2 (SP3): fails to start Box 3 (SP3): starts up, a

Re: [Python-Dev] Correction: Python Bug Day on April 25

2009-04-15 Thread Maciej Fijalkowski
On Wed, Apr 15, 2009 at 1:10 PM, Georg Brandl wrote: > Hi, > > I managed to screw up the date, so here it goes again: > > I'd like to announce that there will be a Python Bug Day on April 25. > As always, this is a perfect opportunity to get involved in Python > development, or bring your own issu

Correction: Python Bug Day on April 25

2009-04-15 Thread Georg Brandl
Hi, I managed to screw up the date, so here it goes again: I'd like to announce that there will be a Python Bug Day on April 25. As always, this is a perfect opportunity to get involved in Python development, or bring your own issues to attention, discuss them and (hopefully) resolve them togethe

Re: *args question (correction)

2009-03-25 Thread Tim Chase
thread.start_new_thread(myfunc, "some string", 42) This should have been thread.start_new_thread(myfunc, ("some string", 42)) because all the subsequent values after the function-handle/name get passed into the function when it gets called. As if the start_new_thread() function was def

CORRECTION: Re: Iterating through a file significantly slower when file has big buffer

2009-01-26 Thread python
Added the following lines missing from my original post: strategy1 = timer( 'Default buffer' ) strategy1.start() Code below is now complete. Malcolm SOURCE: import time # timer class class timer( object ): def __init__( self, message='' ): self.message = message def start( self )

Re: Code Explaination: Spelling correction code

2007-04-12 Thread Drew
On Apr 12, 10:28 am, Steven Bethard <[EMAIL PROTECTED]> wrote: > Drew wrote: > > On Apr 11, 11:27 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > >> Drew wrote: > >>> def known_edits2(word): > >>> return set(e2 for e1 in edits1(word) for e2 in edits1(e1) if e2 in > >>> NWORDS) > > >> This is th

Re: Code Explaination: Spelling correction code

2007-04-12 Thread Steven Bethard
Drew wrote: > On Apr 11, 11:27 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: >> Drew wrote: >>> def known_edits2(word): >>> return set(e2 for e1 in edits1(word) for e2 in edits1(e1) if e2 in >>> NWORDS) >> >> This is the same as: >> >> result = set() >> for e1 in edits1(word): >>

Re: Code Explaination: Spelling correction code

2007-04-12 Thread Drew
On Apr 11, 11:27 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > Drew wrote: > > I recently saw this website:http://www.norvig.com/spell-correct.html > > > All the code makes sense to me save one line: > > > def known_edits2(word): > > return set(e2 for e1 in edits1(word) for e2 in edits1(e1) i

Re: Code Explaination: Spelling correction code

2007-04-11 Thread Steven Bethard
Drew wrote: > I recently saw this website: http://www.norvig.com/spell-correct.html > > All the code makes sense to me save one line: > > def known_edits2(word): > return set(e2 for e1 in edits1(word) for e2 in edits1(e1) if e2 in > NWORDS) This is the same as: result = set() for

Code Explaination: Spelling correction code

2007-04-11 Thread Drew
I recently saw this website: http://www.norvig.com/spell-correct.html All the code makes sense to me save one line: def known_edits2(word): return set(e2 for e1 in edits1(word) for e2 in edits1(e1) if e2 in NWORDS) I understand (from seeing a ruby version of the code) that the goal here is t

correction : Re: pygtk button event

2007-03-27 Thread [EMAIL PROTECTED]
Oups a small mistake: bt=application.get_widget('button1') [EMAIL PROTECTED] wrote: > Hi > > > i am trying to implement the following: > > I want to be able to press a button, perform a task and return a > value. > > my button is named button1 and I used glade to build the gui. > > so, someth

Re: What is a type error? [correction]

2006-07-18 Thread David Hopwood
Darren New wrote: > David Hopwood wrote: > [...] >> Apparently, Hermes (at least the version of it described in that paper) >> essentially forgets that is_last has been initialized at the top of the >> loop, and so when it does the merge, it is merging 'not necessarily >> initialized' with 'initia

Re: What is a type error? [correction]

2006-07-18 Thread Darren New
David Hopwood wrote: > Darren New wrote: > >>David Hopwood wrote: >> >> >>>public class LoopInitTest { >>>public static String getString() { return "foo"; } >>> >>>public static void main(String[] args) { >>>String line = getString(); >>>boolean is_last = false; >>> >>>

Re: What is a type error? [correction]

2006-07-17 Thread David Hopwood
Darren New wrote: > David Hopwood wrote: > >> public class LoopInitTest { >> public static String getString() { return "foo"; } >> >> public static void main(String[] args) { >> String line = getString(); >> boolean is_last = false; >> >> while (!is_last) { >>

Re: What is a type error? [correction]

2006-07-17 Thread Darren New
Darren New wrote: > Now, if the "insert line into inputs" actually unset "line", then yes, > you're right, Hermes would complain about this. Oh, I see. You translated from Hermes into Java, and Java doesn't have the "insert into" statement. Indeed, the line you commented out is *exactly* what's

Re: What is a type error? [correction]

2006-07-17 Thread Darren New
David Hopwood wrote: > > public class LoopInitTest { > public static String getString() { return "foo"; } > > public static void main(String[] args) { > String line = getString(); > boolean is_last = false; > > while (!is_last) { > if (line.charAt(0) =

Re: What is a type error? [correction]

2006-07-17 Thread David Hopwood
David Hopwood wrote: > Darren New wrote: > >>From what I can determine, the authors seem to imply that typestate is >>dataflow analysis modified in (at least) two ways: >> >>1) When control flow joins, the new typestate is the intersection of >>typestates coming into the join, where as dataflow an

Re: What is Expressiveness in a Computer Language [correction]

2006-06-29 Thread rossberg
Joe Marshall wrote: > Andreas Rossberg wrote: > > > > Which is why this actually is a very bad example to chose for dynamic > > typing advocacy... ;-) > > Actually, this seems a *good* example. The problem seems to be that > you end up throwing the baby out with the bathwater: your static type >

Re: What is Expressiveness in a Computer Language [correction]

2006-06-28 Thread Joe Marshall
Andreas Rossberg wrote: > >~/> ocaml -rectypes > Objective Caml version 3.08.3 > ># let rec blackhole x = blackhole;; >val blackhole : 'b -> 'a as 'a = > > The problem is, though, that almost everything can be typed once you > have unrestricted recursive types (e.g. missing a

Re: What is Expressiveness in a Computer Language [correction]

2006-06-28 Thread Andreas Rossberg
David Hopwood wrote: >> >>>(defun blackhole (argument) >>> (declare (ignore argument)) >>> #'blackhole) > I believe this example requires recursive types. It can also be expressed > in a gradual typing system, but possibly only using an unknown ('?') type. > > ISTR that O'Caml at one point (befor

Re: What is Expressiveness in a Computer Language [correction]

2006-06-27 Thread David Hopwood
David Hopwood wrote: > Joe Marshall wrote: > >>(defun blackhole (argument) >> (declare (ignore argument)) >> #'blackhole) > > This is typeable in any system with universally quantified types (including > most practical systems with parametric polymorphism); it has type > "forall a . a -> #'blac

Re: What is Expressiveness in a Computer Language [correction]

2006-06-27 Thread David Hopwood
er* be typable? >>> >>>In a statically typed language that has a "dynamic" type, all >>>dynamically typed programs are straightforwardly expressible. Correction: as the paper on gradual typing referenced below points out in section 5, something like the "typ

Re: ANN: pyfcp (URL correction)

2006-06-19 Thread aum
On Mon, 19 Jun 2006 16:24:41 +1200, aum wrote: > http://www.python.org/pyfcp Sorry, that should have been: http://www.freenet.org.nz/pyfcp -- Cheers aum -- http://mail.python.org/mailman/listinfo/python-list

Suggestion for (re)try statement - correction

2005-10-27 Thread Sori Schwimmer
"i += 1" is wrong there. I had in my mind at first a "while" statement. Sorry... Sorin __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Minor correction July 11, 2005

2005-07-12 Thread Hank Oredson
"edgrsprj" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "edgrsprj" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> PROPOSED EARTHQUAKE FORECASTING >> COMPUTER PROGRAM DEVELOPMENT EFFORT > >> it jumps strait to the display routine and uses the entered command to >

Minor correction July 11, 2005

2005-07-11 Thread edgrsprj
"edgrsprj" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > PROPOSED EARTHQUAKE FORECASTING > COMPUTER PROGRAM DEVELOPMENT EFFORT > it jumps strait to the display routine and uses the entered command to begin Should be the word "straight" instead of strait. -- http://mail.python.o

Re: [perl-python] problem: reducing comparison (correction)

2005-02-16 Thread Xah Lee
Xah Lee wrote: > In imperative languages such as Perl and Python and Java, in general it > is not safe to delete elements when looping thru a list-like entity. > (it screws up the iteration) One must make a copy first, and work with > the copy. Correction: When looping thru a list