Hello,
My python code needs to run on versions 2.7 to 3.4. To use stringio
function as appropriate, the code i use is;
if sys.version < '3':
dictionary = io.StringIO(u"""\n""".join(english_words))
else:
dictionary = io.StringIO("""\n""".join(english_words))
The co
Hi,
There appears to be a problem with this program.
It is taken from the "Starting out with Python" book third edition.
The problem is when the "validate the wholesale cost" is introduced.
Without the validator the code works fine, but with it the code won't let you
enter a positive wholesale co
I am trying to write a program that uses while and if loops, but my print
statements are not going through and showing up when I run the module. I
have tried numerous things and changed in the code and cannot for the life
of me figure out why it won't print. If someone could help that would be
amaz
On 04/05/15 06:03, anupama srinivas murthy wrote:
Hello,
My python code needs to run on versions 2.7 to 3.4. To use stringio
function as appropriate, the code i use is;
if sys.version < '3':
dictionary = io.StringIO(u"""\n""".join(english_words))
else:
diction
On 04/05/15 05:26, Jag Sherrington wrote:
Hi,
There appears to be a problem with this program.
It is taken from the "Starting out with Python" book third edition.
The problem is when the "validate the wholesale cost" is introduced.
Without the validator the code works fine, but with it the code
Jag Sherrington wrote:
> Hi,
> There appears to be a problem with this program.
> It is taken from the "Starting out with Python" book third edition.
>
> The problem is when the "validate the wholesale cost" is introduced.
> Without the validator the code works fine, but with it the code won't le
Grace Anne St Clair-Bates wrote:
> I am trying to write a program that uses while and if loops, but my print
> statements are not going through and showing up when I run the module. I
> have tried numerous things and changed in the code and cannot for the life
> of me figure out why it won't print
On 04/05/15 06:00, Grace Anne St Clair-Bates wrote:
I am trying to write a program that uses while and if loops, but my print
statements are not going through and showing up when I run the module. I
have tried numerous things and changed in the code and cannot for the life
of me figure out why it
On Mon, May 4, 2015 at 7:03 AM, anupama srinivas murthy
wrote:
> Hello,
>
> My python code needs to run on versions 2.7 to 3.4. To use stringio
> function as appropriate, the code i use is;
>
> if sys.version < '3':
A better comparison to use would be
if sys.version_info[0] == 2:
It’s the stand
anupama srinivas murthy wrote:
> Hello,
>
> My python code needs to run on versions 2.7 to 3.4. To use stringio
> function as appropriate, the code i use is;
>
> if sys.version < '3':
> dictionary = io.StringIO(u"""\n""".join(english_words))
> else:
> dictionary =
Peter Otten wrote:
> anupama srinivas murthy wrote:
>
>> Hello,
>>
>> My python code needs to run on versions 2.7 to 3.4. To use stringio
>> function as appropriate, the code i use is;
>>
>> if sys.version < '3':
>> dictionary = io.StringIO(u"""\n""".join(english_words))
>>
> On May 4, 2015 2:17 AM, "anupama srinivas murthy" <
> anupama.2312.bm...@gmail.com> wrote:
>
>> Hello,
>>
>> My python code needs to run on versions 2.7 to 3.4. To use stringio
>> function as appropriate, the code i use is;
>>
>> if sys.version < '3':
>> dictionary = io.StringIO(u"""\
My code is wrong!
I tried and tried
But I'm very isolated and It's hard without consultation with a tutor
from math import sqrt
def holeofStrainer():
bigList = [False, False] + [True]*100
print("line 4 - bigList : ", bigList)
for num in range(2, 101):
print("line 6 - num : ", num)
for
On 05/04/2015 03:19 AM, yvan moses Levy wrote:
My code is wrong!
You'd find it a lot easier to get responses if you'd say in what way the
code is wrong. If you get an exception, show the full traceback. If
you get printed results, show what you expected, and what you got
instead. If it hu
On Mon, May 4, 2015 at 2:46 AM, Chris Warrick wrote:
> Python 3.0–3.2 do not support the u'' notation for Unicode strings, it
> was restored in Python 3.3 to make it easier to write code compatible
> with 2.x and 3.x
Whoever restored this forgot about raw literals:
>>> ur'abc'
File "",
Apologies: this is somewhat off-topic, but I thought it might resonate
with the audience here:
https://www.youtube.com/watch?v=hIJdFxYlEKE
It reminds me of Camille Fournier's talk back in 2014 at BangBangCon:
https://www.youtube.com/watch?v=sc8sc-ELMhA
Both express the experience of bei
I would like some help integrating TDD into my current projects.
My chosen TDD framework is unittest from the standard library.
My system details are: Linux Mint 17.1 64-bit, Python 3.4, bzr(for
version control).
My projects are structured like:
Project > develop > Project > Project > __main__.
Hi there,
I would like some help integrating TDD into my current projects.
My chosen TDD framework is unittest from the standard library. My
system details are: Linux Mint 17.1 64-bit, Python 3.4, bzr(for
version control).
My projects are structured like:
Project > develop > Project > Proje
Hi, Alan> Enter the item's wholesale cost: 0.50 (AFTER THIS LINE PRINTS I HIT
ENTER AND WOULD EXPECT THE NEXT LINE TO GIVE ME THE RESULT> Enter the item's
wholesale cost: "Retail price: $1.25" INSTEAD WHEN I HIT ENTER I GET "Enter
the item's wholesale cost: " AGAIN AND AGAIN
Regards, Jag
Bra
On 05/05/15 00:08, Jag Sherrington wrote:
Hi, Alan
> Enter the item's wholesale cost: 0.50
(AFTER THIS LINE PRINTS I HIT ENTER AND WOULD
EXPECT THE NEXT LINE TO GIVE ME THE RESULT
But why would it? Your print code is all inside a loop that
only runs if the price is negative. If you enter a posi
On 05/04/2015 07:08 PM, Jag Sherrington wrote:
Hi, Alan>
Please don't top-post. Enter your new message *after* whatever portion
of the previous message you're quoting. I'm rearranging the portion of
your message to conform to that standard.
On Monday, 4 May 2015, 17:35, Alan Ga
You accidentally sent your response to me instead of the list. The
proper thing to do for nearly all messages is to respond to the list.
The main exception for that is if you just want to leave a simple
thank-you for a person, and nothing of interest to anyone else.
From your email program, u
22 matches
Mail list logo