On Thu, Sep 4, 2014 at 4:23 PM, Rustom Mody wrote:
> A patient goes to hospital. The first thing the nurses do (even before the
> doctor arrives) is to stick all kinds of tubes into... eyes, nose, ears and
> other unmentionable places. The doctor arrives and orders a few more
> invasions.
> Some
On Thursday, September 4, 2014 10:33:38 AM UTC+5:30, Chris Angelico wrote:
> On Thu, Sep 4, 2014 at 2:11 PM, Rustom Mody wrote:
> > Is there some PEP filed called "Abolish print in python 4" ?
> > I dont remember filing any such...
> You screamed "NO PRINT" at us in the voice of Edna Mode. (At lea
Steven D'Aprano :
> Marko Rauhamaa wrote:
>> That's the classic Boolean algebraic notation.
>
> Says who? (Apart from you, obviously :-) Since when? I've never seen
> it in *any* discussion of Boolean algebra.
I have only run into George Boole, Boolean algebra and booleans in
engineering textboo
On Thu, Sep 4, 2014 at 9:39 AM, MRAB wrote:
> I occasionally think about a superset of JSON, called, say, "pyson" ...
> ah, name already taken! :-(
While I'm somewhat sympathetic to the concept, there are some parts of
your description that I disagree with. Am I misreading something? Are
there ty
On Thu, Sep 4, 2014 at 2:11 PM, Rustom Mody wrote:
> Is there some PEP filed called "Abolish print in python 4" ?
> I dont remember filing any such...
You screamed "NO PRINT" at us in the voice of Edna Mode. (At least,
that's how I imagined it being said. YMMV.)
> Perhaps you should think of the
1) There are, if you want to mess around with them, ways to make pickle
"smarter" about class stuff:
https://docs.python.org/2/library/pickle.html#pickling-and-unpickling-normal-class-instances
. I've never worked with any of this stuff (and people don't seem to like
pickle all that much), and
On Thursday, September 4, 2014 9:37:05 AM UTC+5:30, Ethan Furman wrote:
> Ridiculous argument after ridiculous argument. Please do not waste our time
> with nonsense.
See my answer (3.) to Chris above.
--
https://mail.python.org/mailman/listinfo/python-list
On Thursday, September 4, 2014 9:20:02 AM UTC+5:30, Chris Angelico wrote:
> On Thu, Sep 4, 2014 at 1:22 PM, Rustom Mody wrote:
> > | Effect-free programming
> > | -- Function calls have no side effects, facilitating compositional
> > reasoning
> > | -- Variables are immutable, preventing unexpect
On Thu, Sep 4, 2014 at 1:52 PM, Cameron Simpson wrote:
> On 03Sep2014 20:59, Tim Chase wrote:
>>
>> - mime-parts can be nested, so I need to recursively handle them
>
>
> Just to this. IIRC, the MIME part delimiter is supposed to be absolute. That
> is, it will not occur in the nested subparts, i
On 09/03/2014 08:22 PM, Rustom Mody wrote:
On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote:
On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote:
NO PRINT
Yes, or the OP could work with actual saved .py files and the
reliability that comes from predictable execution e
On 03Sep2014 20:59, Tim Chase wrote:
- mime-parts can be nested, so I need to recursively handle them
Just to this. IIRC, the MIME part delimiter is supposed to be absolute. That
is, it will not occur in the nested subparts, if any.
Of course that is no good to you working from outside via
On Thu, Sep 4, 2014 at 1:22 PM, Rustom Mody wrote:
> | Effect-free programming
> | -- Function calls have no side effects, facilitating compositional reasoning
> | -- Variables are immutable, preventing unexpected changes to program data
> by other code
> | -- Data can be freely aliased or copied
On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote:
> On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote:
> NO PRINT
> Yes, or the OP could work with actual saved .py files and the
> reliability that comes from predictable execution environments... and
> use print. Why
On Thursday, September 4, 2014 7:56:31 AM UTC+5:30, Chris Angelico wrote:
> On Thu, Sep 4, 2014 at 12:10 PM, Rustom Mody wrote:
> > On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote:
> >> On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote:
> >> NO PRINT
> >> Why are you
On Thu, Sep 4, 2014 at 12:10 PM, Rustom Mody wrote:
> On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote:
>> On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote:
>> NO PRINT
>
>
>> Why are you so dead against print?
>
> Because it heralds a typical noob code-smell
> [espe
On Thursday, September 4, 2014 7:24:19 AM UTC+5:30, Steven D'Aprano wrote:
> Marko Rauhamaa wrote:
> > Steven D'Aprano:
> >> Who uses + for disjunction (∨ OR) and concatenation for conjunction (∧
> >> AND)? That's crazy notation.
> > That's the classic Boolean algebraic notation.
> Says who? (Ap
On 9/3/14 6:30 PM, Josh English wrote:
On Wednesday, September 3, 2014 1:53:23 PM UTC-7, Ned Batchelder wrote:
Pickle (and it looks like jsonpickle) does not invoke the class'
__init__ method when it reconstitutes objects. Your new __init__ is not
being run, so new attributes it defines are no
Seymore4Head wrote:
> Ok, I understand now that x is actually the first item in the list.
> What I want is a loop that goes from 1 to the total number of items in
> the list steve.
99% of the time, you don't want that at all. Trust me, iterating over the
values in the list is *nearly* always the
On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote:
> On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote:
> NO PRINT
> Why are you so dead against print?
Because it heralds a typical noob code-smell
[especially when the OP admits that BASIC is his background]
> Yes,
On Thu, Sep 4, 2014 at 11:54 AM, Steven D'Aprano
wrote:
> although the
> analogy is terrible for ∨. 1+1 = 2, not 1.
I wouldn't say terrible. Unclear perhaps, but functional. Try this exercise:
false, true = 0, 1 # or use an old Python
if true + true:
print("true OR true is true")
As long as
I'd like to do something like the following pseudocode
existing_message = mailbox[key] # an email.message.Message
new_message = email.message.Message()
for part in existing_message.walk():
if passes_test(part):
new_message.add(part) # need proper call here
else:
log("skip
On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote:
NO PRINT
Yes, or the OP could work with actual saved .py files and the
reliability that comes from predictable execution environments... and
use print. Why are you so dead against print?
ChrisA
--
https://mail.python.org/mailman/listinfo/
Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> Who uses + for disjunction (∨ OR) and concatenation for conjunction (∧
>> AND)? That's crazy notation.
>
> That's the classic Boolean algebraic notation.
Says who? (Apart from you, obviously :-) Since when? I've never seen it in
*any* discussion o
On Wednesday, September 3, 2014 11:41:27 PM UTC+5:30, Seymore4Head wrote:
> import math
> import random
> import sys
> b=[]
> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
> for x in steve:
> print (steve[x])
> Traceback (most recent call last):
> print (steve[x])
> IndexError: list index
On Thu, 04 Sep 2014 00:39:07 +0100, MRAB wrote:
> It would add tuples, delimited by (...), which are not used otherwise
> (no expressions):
I guess <> and () are both unused as delims by json at present.
I like the idea of other key types than string.
--
Denis McMahon, denismfmcma...@gmail.com
On 2014-09-03 23:30, Josh English wrote:
On Wednesday, September 3, 2014 1:53:23 PM UTC-7, Ned Batchelder
wrote:
Pickle (and it looks like jsonpickle) does not invoke the class'
__init__ method when it reconstitutes objects. Your new __init__
is not being run, so new attributes it defines are
Latest version of Chess test prog for anyone who might be interested.
It does not do en-passon or castling.
Best Regards
Chris
#!/opt/local/bin/pypy -u -tt
#!/opt/local/bin/pypy -u -tt -m cProfile
# -*- coding: utf-8 -*-
# Copyright (C) 2013-2014 Chris Hinsley, GPL V3 License
import sys, os,
On Wednesday, September 3, 2014 1:53:23 PM UTC-7, Ned Batchelder wrote:
> Pickle (and it looks like jsonpickle) does not invoke the class'
> __init__ method when it reconstitutes objects. Your new __init__ is not
> being run, so new attributes it defines are not being created.
>
> This is one o
On 09/03/2014 02:52 PM, jaron.br...@gmail.com wrote:
Ethan, Steve, Tim, and others:
I'm thinking of taking the program. How long, in hours, does it take to
complete all four Python courses?
That is an impossible question to answer accurately.
I took the classes already having extensive knowl
Ethan, Steve, Tim, and others:
I'm thinking of taking the program. How long, in hours, does it take to
complete all four Python courses?
-Jaron Breen
On Wednesday, December 15, 2010 12:54:27 PM UTC-5, Ethan Furman wrote:
> So I just got an e-mail from O'Reilly and their School of Technology
>
On 03/09/2014 19:52, Seymore4Head wrote:
I see that now.
Thanks
Maybe some comments in your code would help you? And also posting an
on-topic title would help too.
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head wrote:
> import math import random import sys b=[]
> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
> for x in steve:
> print (steve[x])
>
> Traceback (most recent call last):
> File "C:\Functions\blank.py", line 7, in
> print (steve[x])
On 9/3/14 4:32 PM, Josh English wrote:
I am using jsonpickle to store instances of an object into separate data files.
If I make any changes to the original class definition of the object, when I
recreate my stored instances, they are recreated using the original class
definition, so any new a
I am using jsonpickle to store instances of an object into separate data files.
If I make any changes to the original class definition of the object, when I
recreate my stored instances, they are recreated using the original class
definition, so any new attributes, methods, or properties, are lo
On 09/03/2014 11:41 AM, Seymore4Head wrote:
On Wed, 03 Sep 2014 11:33:46 -0700, Ethan Furman wrote:
Python will be incredibly hard if you don't read any of the docs or tutorials
available.
You can't accuse me of that. I have actually read quite a bit. I may
not be picking it up, but I am t
On Wed, 3 Sep 2014 13:11:51 -0600, Ian Kelly
wrote:
>On Wed, Sep 3, 2014 at 12:49 PM, Seymore4Head
> wrote:
>> On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head
>> wrote:
>>
>>>import math
>>>import random
>>>import sys
>>>b=[]
>>>steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
>>>for x in steve:
On Wed, Sep 3, 2014 at 12:49 PM, Seymore4Head
wrote:
> On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head
> wrote:
>
>>import math
>>import random
>>import sys
>>b=[]
>>steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
>>for x in steve:
>>print (steve[x])
>>
>>Traceback (most recent call last):
>>
On Wed, 03 Sep 2014 11:55:13 -0700
Ethan Furman wrote:
> On 09/03/2014 11:49 AM, Seymore4Head wrote:
> > On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head
> > wrote:
> >
> >> import math
> >> import random
> >> import sys
> >> b=[]
> >> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
> >> for x in
On Wed, 3 Sep 2014 15:44:47 -0300, Juan Christian
wrote:
>I'm learning Python using this mailist, and the Tutor mailist, reading the
>docs and watching this course, Python Fundamentals (
>http://www.pluralsight.com/training/Courses/TableOfContents/python-fundamentals
>).
>
>Python is really easy
On 09/03/2014 11:49 AM, Seymore4Head wrote:
On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head
wrote:
import math
import random
import sys
b=[]
steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
for x in steve:
print (steve[x])
Traceback (most recent call last):
File "C:\Functions\blank.py",
On Wed, 3 Sep 2014 13:28:39 -0500, Skip Montanaro
wrote:
>On Wed, Sep 3, 2014 at 1:24 PM, MRAB wrote:
>> Iterating over a list yields its contents, not indexes.
>
>Unlike in JavaScript. Not sure where the OP is coming from, but that
>"feature" of JavaScript threw me when I first encountered it.
On Wed, 3 Sep 2014 18:17:27 + (UTC), John Gordon
wrote:
>In Seymore4Head
> writes:
>
>> import math
>> import random
>> import sys
>
>Why are you importing these modules if they're not used?
>
>> b=[]
>
>Likewise b is not used.
>
>> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
>> for x in
On Wed, 3 Sep 2014 11:19:04 -0700, Rob Gaddi
wrote:
>On Wed, 03 Sep 2014 14:10:42 -0400
>Seymore4Head wrote:
>
>> import math
>> import random
>> import sys
>> b=[]
>> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
>> for x in steve:
>> print (steve[x])
>>
>> Traceback (most recent call las
On Wed, 03 Sep 2014 14:10:42 -0400, Seymore4Head
wrote:
>import math
>import random
>import sys
>b=[]
>steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
>for x in steve:
>print (steve[x])
>
>Traceback (most recent call last):
> File "C:\Functions\blank.py", line 7, in
>print (steve[x])
>In
I'm learning Python using this mailist, and the Tutor mailist, reading the
docs and watching this course, Python Fundamentals (
http://www.pluralsight.com/training/Courses/TableOfContents/python-fundamentals
).
Python is really easy and useful, OP don't blame the language because you
didn't unders
On Wed, 03 Sep 2014 11:33:46 -0700, Ethan Furman
wrote:
>On 09/03/2014 11:10 AM, Seymore4Head wrote:
>> import math
>> import random
>> import sys
>> b=[]
>> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
>> for x in steve:
>> print (steve[x])
>>
>> Traceback (most recent call last):
>>F
On 09/03/2014 11:10 AM, Seymore4Head wrote:
import math
import random
import sys
b=[]
steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
for x in steve:
print (steve[x])
Traceback (most recent call last):
File "C:\Functions\blank.py", line 7, in
print (steve[x])
IndexError: list index
On Wed, Sep 3, 2014 at 1:24 PM, MRAB wrote:
> Iterating over a list yields its contents, not indexes.
Unlike in JavaScript. Not sure where the OP is coming from, but that
"feature" of JavaScript threw me when I first encountered it. My guess
would be that his prior experience includes (at least)
In Seymore4Head
writes:
> import math
> import random
> import sys
Why are you importing these modules if they're not used?
> b=[]
Likewise b is not used.
> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
> for x in steve:
> print (steve[x])
As you step through the loop, x becomes each
On 2014-09-03 19:10, Seymore4Head wrote:
import math
import random
import sys
b=[]
steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
for x in steve:
print (steve[x])
Traceback (most recent call last):
File "C:\Functions\blank.py", line 7, in
print (steve[x])
IndexError: list index out
On Wed, 03 Sep 2014 14:10:42 -0400
Seymore4Head wrote:
> import math
> import random
> import sys
> b=[]
> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
> for x in steve:
> print (steve[x])
>
> Traceback (most recent call last):
> File "C:\Functions\blank.py", line 7, in
> print (ste
print(x)
:)
2014-09-03 20:10 GMT+02:00 Seymore4Head :
> import math
> import random
> import sys
> b=[]
> steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
> for x in steve:
> print (steve[x])
>
> Traceback (most recent call last):
> File "C:\Functions\blank.py", line 7, in
> print (ste
import math
import random
import sys
b=[]
steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
for x in steve:
print (steve[x])
Traceback (most recent call last):
File "C:\Functions\blank.py", line 7, in
print (steve[x])
IndexError: list index out of range
--
https://mail.python.org/mailman/
Hello,
I am announcing the release of pathlib 1.0.1. This version makes pathlib
Python 2.6-compatible. Note that 2.6 compatibility may not have been as
well tested as more recent Python versions (especially on non-Unix
platforms).
As a reminder, the standalone (PyPI) version of pathlib will no
Peter Otten <__pete...@web.de> wrote:
> c...@isbd.net wrote:
>
> > I know I can get a list of the characters in a string by simply doing:-
> >
> > listOfCharacters = list("This is a string")
> >
> > ... but how do I get a list of integers?
> >
>
> >>> [ord(c) for c in "This is a string"]
>
On Wednesday, September 3, 2014 12:00:10 PM UTC+3, Peter Otten wrote:
> dream4s...@gmail.com wrote:
>
>
>
> > calc_crc(b'\x00\x00\x34\x35\x38\x35')
>
>
>
> > unsigned char a[]={0x30,0x30,0x34,0x35,0x38,0x35};
>
>
>
> The first two bytes differ; you made an error on the input.
Dear Peter,
El miércoles, 3 de septiembre de 2014 05:27:29 UTC-7, c...@isbd.net escribió:
> I know I can get a list of the characters in a string by simply doing:-
>
>
>
> listOfCharacters = list("This is a string")
>
>
>
> ... but how do I get a list of integers?
>
>
>
> --
>
> Chris Green
>
c...@isbd.net wrote:
> I know I can get a list of the characters in a string by simply doing:-
>
> listOfCharacters = list("This is a string")
>
> ... but how do I get a list of integers?
>
>>> [ord(c) for c in "This is a string"]
[84, 104, 105, 115, 32, 105, 115, 32, 97, 32, 115, 116, 114
I know I can get a list of the characters in a string by simply doing:-
listOfCharacters = list("This is a string")
... but how do I get a list of integers?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, September 3, 2014 12:00:10 PM UTC+3, Peter Otten wrote:
> dream4s...@gmail.com wrote:
>
>
>
> > calc_crc(b'\x00\x00\x34\x35\x38\x35')
>
>
>
> > unsigned char a[]={0x30,0x30,0x34,0x35,0x38,0x35};
>
>
>
> The first two bytes differ; you made an error on the input.
Dear Peter,
Hi all
After putting my AccInABox package up on GitHub and letting a few people
know about it, I received the following response -
> > From: "Stéfan van der Walt"
> > Hi Frank
> > It would be great if the readme would list some features of the software
> > so that one can decide whether it is
dream4s...@gmail.com wrote:
> calc_crc(b'\x00\x00\x34\x35\x38\x35')
> unsigned char a[]={0x30,0x30,0x34,0x35,0x38,0x35};
The first two bytes differ; you made an error on the input.
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, September 3, 2014 10:19:29 AM UTC+3, Peter Otten wrote:
> dream4s...@gmail.com wrote:
>
>
>
> > On Tuesday, September 2, 2014 9:24:54 PM UTC+3, Peter Otten wrote:
>
> >> dream4s...@gmail.com wrote:
>
> >>
>
> >>
>
> >>
>
> >> > I have trouble to implement crc algorithm in p
On Wednesday, September 3, 2014 10:19:29 AM UTC+3, Peter Otten wrote:
> dream4s...@gmail.com wrote:
>
>
>
> > On Tuesday, September 2, 2014 9:24:54 PM UTC+3, Peter Otten wrote:
>
> >> dream4s...@gmail.com wrote:
>
> >>
>
> >>
>
> >>
>
> >> > I have trouble to implement crc algorithm in p
On Tue, 02 Sep 2014 18:45:54 +1000, Chris Angelico wrote:
> On Tue, Sep 2, 2014 at 6:35 PM, alister
> wrote:
>> if edlin is your only option then it would be better to spend you time
>> writhing your own text editor!
>
> Heh!
>
> Considering how easy it is to deploy a multi-line edit widget in
Rob Gaddi wrote:
otherwise getting up and
running will cost you a solid $1200 just in gear.
While having fancy gear certainly helps, it's not
*strictly* necessary. When I first started dabbling
in electronics, the most sophisticated piece of
equipment I had was an analog multimeter.
It got me
Steven D'Aprano :
> Who uses + for disjunction (∨ OR) and concatenation for conjunction (∧
> AND)? That's crazy notation.
That's the classic Boolean algebraic notation. In basic algebra, the two
interesting operations are "addition" and "multiplication". Boolean math
works like elementary arithme
On 03/09/2014 07:19, dream4s...@gmail.com wrote:
Would you please access this list via
https://mail.python.org/mailman/listinfo/python-list or read and action
this https://wiki.python.org/moin/GoogleGroupsPython to prevent us
seeing double line spacing and single line paragraphs, thanks.
--
On Tue, 02 Sep 2014 20:14:51 -0700, Rustom Mody wrote:
> Dijkstra
> used to point out
>
> A ∧ (B ∨ C) ≡ (A ∧ B) ∨ (A ∧ C) A ∨ (B ∧ C) ≡ (A ∨ B) ∧ (A ∨ C) look
> normal enough in this form
>
> Put then into the way engineers do it and they become A(B + C) = AB + AC
> A + BC = (A+B)(A+C)
o_O
Who
dream4s...@gmail.com wrote:
> On Tuesday, September 2, 2014 9:24:54 PM UTC+3, Peter Otten wrote:
>> dream4s...@gmail.com wrote:
>>
>>
>>
>> > I have trouble to implement crc algorithm in python 3.3
>>
>> >
>>
>> > c version work perfect. I try to use bytes, int and c_types without
>> > any
70 matches
Mail list logo