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
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
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
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
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
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
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
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
Now I see that I wrote a quite unreadable typo: "unterd".
I meant "untared".
Peter Tomcsanyi
--
https://mail.python.org/mailman/listinfo/python-list
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
@ 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
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.
>
>
>&
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
@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
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
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
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
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
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
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
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.
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
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 (
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
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
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
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
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 )
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
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):
>>
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
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
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
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
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
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;
>>>
>>>
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) {
>>
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
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) =
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
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
>
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
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
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
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
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
"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
"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
>
"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
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
50 matches
Mail list logo