h the following exception:
Traceback (most recent call last):
File "./test.py", line 7, in
p = Popen("/bin/date", stdin=PIPE, stdout=PIPE, stderr=PIPE)
File "/home/erik/lib/python2.7/subprocess.py", line 679, in __init__
File "/home/erik/lib/python2.7/sub
On 26/08/16 08:44, mlzarathus...@gmail.com wrote:
Here's the key:
$ python2
Python 2.7.10 ...
1/2
0
$ python
Python 3.5.1 ...
1/2
0.5
1//2
0
I read about this awhile ago, but it's not until it bites you that you remember
fully.
How is this related to your question? The example e
On 26/08/16 08:14, mlzarathus...@gmail.com wrote:
I was being facetious, but behind it is a serious point. Neither the APL nor
the J languages use precedence even though their inventor, Ken Iverson, was a
mathematician.
That was to support functional programming dating back to the 1970's.
P
On 06/10/16 22:11, Paul Rubin wrote:
"Jolly Good Spam" writes:
Can someone please suggest what I should be looking at and doing to be
able to effectively run multiple independent Pythons in a single
program?
Put each Python in a separate process and communicate by IPC.
Loren says that this
On 06/10/16 22:40, Loren Wilton wrote:
the multi-user program is a virtual machine
implementation
That's not relevant (unless you mean each user is running in their own
VM, in which case you _really_ need to describe your execution environment).
BTW, you _really_ need to describe your execut
Hi,
On 13/11/16 20:09, menta...@gmail.com wrote:
HI want to make a script that if somthing happens, it stop, and if it doesnt,
it couninues. I dont finding a smart way.
Read the documentation for the "while", "break" and "continue" keywords.
Regards, E.
--
https://mail.python.org/mailman/li
On 15/11/16 14:43, Michael Torrie wrote:
As you've been told several times, if you "import deen" then you can
place a new object into the deen namespace using something like:
deen.foo=bar
Importing everything from an imported module into the current module's
namespace is not the best idea
But
On 13/12/16 06:14, Gregory Ewing wrote:
Ned Batchelder wrote:
if a C++ constructor raises an exception, will the corresponding
destructor
be run, or not? (No, because it never finished making an object of
type T.)
So it just leaks any memory that's been allocated by
the partially-run construct
On 12/12/16 23:23, Chris Angelico wrote:
In JavaScript, it's normal to talk about "calling a function as a
constructor". When you do, there is a 'this' object before you start.
No there isn't. There is an implicit binding of a variable called "this"
based on the syntactic sugar of whether you'
On 16/12/16 01:17, Chris Angelico wrote:
On Fri, Dec 16, 2016 at 11:36 AM, Erik wrote:
On 12/12/16 23:23, Chris Angelico wrote:
In JavaScript, it's normal to talk about "calling a function as a
constructor". When you do, there is a 'this' object before you start.
r this sub-thread when
searching in future.
On 18/12/16 01:21, Chris Angelico wrote:
On Sun, Dec 18, 2016 at 12:01 PM, Erik wrote:
I wish I could find the resource I originally learned this stuff from,
because it's quite enlightening and I'd like to link to it here
Sounds like
On 30/12/16 23:00, Deborah Swanson wrote:
Oops, indentation was messed up when I copied it into the email. Should
be this:
if len(l1[st]) == 0:
if len(l2[st]) > 0:
l1[st] = l2[st]
elif len(l2[st]) == 0:
if len(l1[st]
On 30/12/16 23:34, einstein1...@gmail.com wrote:
You are also confusing me.
But there mustbe some reason.
What happens if your student questions you like this.?
And may be those who questions like this will surely be the developer of its
successor language.
Because out of thousands, only one ma
On 31/12/16 00:26, Deborah Swanson wrote:
As Mr. Bieber points out, what I had above greatly benefits from the use
of conjunctions. It now reads:
if not len(l1[st]) and len(l2[st]):
IMHO, "if not len(l)" is a _terrible_ way of spelling "if len(l) == 0"
(mentally, I have to read that as "if le
On 31/12/16 05:22, Wildman via Python-list wrote:
On Fri, 30 Dec 2016 19:23:17 -0700, Michael Torrie wrote:
On 12/30/2016 07:05 PM, Wildman via Python-list wrote:
On Fri, 30 Dec 2016 23:39:43 +, Erik wrote:
Do not feed the troll.
E.
Please explain how what I said is trolling. Perhaps
Hi.
On 03/01/17 19:46, Deborah Swanson wrote:
Excel has a formula:
When you start a new topic on the list, could you please write a new
message rather than replying to an existing message and changing the
title/subject?
For those reading the list in a threaded email client, this message is
Hi,
On 03/01/17 22:14, Deborah Swanson wrote:
...you have to create the generator object first and use it to call the
next function. And I really don't think you can use a generator as your
range in a for loop. So I'd use a 'while True', and break out of the
loop when you hit the StopIteration e
On 03/01/17 23:05, Deborah Swanson wrote:
And yes, we usually used for loops for generators, unless you don't know
when the generator will be exhausted. As in this case, where the number
of files the generator can provide is unknown. Then we used the while
True, break on StopIteration method.
O
On 03/01/17 23:56, Chris Angelico wrote:
On Wed, Jan 4, 2017 at 10:49 AM, wrote:
#think of a number
computer_number = number.randint(1,100)
What's wrong is that you aren't showing us the exception you get on
this line. *Copy and paste* that exception - the whole thing. It's
very helpful.
I
On 03/01/17 22:47, Chris Angelico wrote:
On Wed, Jan 4, 2017 at 9:42 AM, Ethan Furman wrote:
Aside from calling "except Exception" a "naked except"
If you read the comments, you'll see that he originally had an actual
bare except clause, but then improved the code somewhat in response to
a re
Hi Callum,
On 04/01/17 00:02, Callum Robinson wrote:
> When i check the code it comes up with invalid syntax and my writing
line gets re directed here
>
> def is_same(target, number:
> if target == number:
> result="win"
> elif target > number:
> result="
Hi Callum,
On 04/01/17 00:30, Callum Robinson wrote:
I feel like im missing something so blatantly obvious.
That's because you are ;). I don't want to come across as patronising,
but I want you to see it for yourself, so, here's a function definition
similar to yours that doesn't have the sa
On 04/01/17 00:32, Callum Robinson wrote:
I forgot a bloody bracket xD
Cool, you got it ;) It's the sort of thing your brain will see instantly
once you've done it a few times :D
and now theirs a new error ill try to figure this out on my own.
You need to look back to Chris's original rep
Hi,
On 04/01/17 01:12, Deborah Swanson wrote:
The main reason you might want to catch the StopIteration exception is
to do something else before your code simply stops running. If all
you're doing is run a generator til it's out of gas, and that's all you
want it to do, then there's no need to c
On 04/01/17 01:10, Steve D'Aprano wrote:
On Wed, 4 Jan 2017 11:22 am, Erik wrote:
What he *should* have done is just validated his input strings before
presenting the string to int() - i.e., process the input with knowledge
that is specific to the problem domain before calling the
ge
On 04/01/17 02:24, Callum Robinson wrote:
On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote:
What values can 'is_same' return?
Which of those values are you checking for in the loop?
I'm sorry but i do not completely understand what you are stating
You need to think about the s
On 04/01/17 02:47, Callum Robinson wrote:
On Wednesday, January 4, 2017 at 3:35:53 PM UTC+13, Erik wrote:
I did it and this is what it states when i run it
hello.
I have thought of a number between 1 and 100.
Can you guess it?
5
Low
Sorry , you are too high. Try again.
Does this mean the
On 04/01/17 03:25, Steven D'Aprano wrote:
On Wednesday 04 January 2017 12:25, Callum Robinson wrote:
Hey man thanks, the sad thing is i have no idea why i put that in. I must be
having a terrible day.
Don't worry about it. The difference between a beginner and an expert is *not*
that experts
Hi.
On 03/01/17 19:46, Deborah Swanson wrote:
> Excel has a formula:
When you start a new topic on the list, could you please write a new message
rather than replying to an existing message and changing the title/subject?
For those reading the list in a threaded email client, this message is sh
Hi,
On 03/01/17 22:14, Deborah Swanson wrote:
> ...you have to create the generator object first and use it to call the
> next function. And I really don't think you can use a generator as your
> range in a for loop. So I'd use a 'while True', and break out of the
> loop when you hit the StopItera
On 03/01/17 23:56, Chris Angelico wrote:
> On Wed, Jan 4, 2017 at 10:49 AM, wrote:
>> #think of a number
>> computer_number = number.randint(1,100)
>
> What's wrong is that you aren't showing us the exception you get on
> this line. *Copy and paste* that exception - the whole thing. It's
> very h
On 03/01/17 23:05, Deborah Swanson wrote:
> And yes, we usually used for loops for generators, unless you don't know
> when the generator will be exhausted. As in this case, where the number
> of files the generator can provide is unknown. Then we used the while
> True, break on StopIteration metho
Hi Callum,
On 04/01/17 00:02, Callum Robinson wrote:
> When i check the code it comes up with invalid syntax and my writing
line gets re directed here
>
> def is_same(target, number:
> if target == number:
> result="win"
> elif target > number:
> resu
On 04/01/17 00:32, Callum Robinson wrote:
> I forgot a bloody bracket xD
Cool, you got it ;) It's the sort of thing your brain will see instantly once
you've done it a few times :D
> and now theirs a new error ill try to figure this out on my own.
You need to look back to Chris's original reply
On 03/01/17 22:47, Chris Angelico wrote:
> On Wed, Jan 4, 2017 at 9:42 AM, Ethan Furman wrote:
>> Aside from calling "except Exception" a "naked except"
>
> If you read the comments, you'll see that he originally had an actual
> bare except clause, but then improved the code somewhat in response t
Hi Callum,
On 04/01/17 00:30, Callum Robinson wrote:
> I feel like im missing something so blatantly obvious.
That's because you are ;). I don't want to come across as patronising, but I
want you to see it for yourself, so, here's a function definition similar to
yours that doesn't have the sam
Hi,
On 04/01/17 01:12, Deborah Swanson wrote:
> The main reason you might want to catch the StopIteration exception is
> to do something else before your code simply stops running. If all
> you're doing is run a generator til it's out of gas, and that's all you
> want it to do, then there's no nee
On 04/01/17 01:10, Steve D'Aprano wrote:
> On Wed, 4 Jan 2017 11:22 am, Erik wrote:
>> What he *should* have done is just validated his input strings before
>> presenting the string to int() - i.e., process the input with knowledge
>> that is specific to the problem
On 04/01/17 02:24, Callum Robinson wrote:
> On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote:
>> What values can 'is_same' return?
>>
>> Which of those values are you checking for in the loop?
>
> I'm sorry but i do not completely understand what you are stating
You need to think abo
On 04/01/17 03:25, Steven D'Aprano wrote:
> On Wednesday 04 January 2017 12:25, Callum Robinson wrote:
>
>> Hey man thanks, the sad thing is i have no idea why i put that in. I must be
>> having a terrible day.
>
> Don't worry about it. The difference between a beginner and an expert is
*not*
> tha
On 04/01/17 02:47, Callum Robinson wrote:
> On Wednesday, January 4, 2017 at 3:35:53 PM UTC+13, Erik wrote:
> I did it and this is what it states when i run it
>
> hello.
> I have thought of a number between 1 and 100.
> Can you guess it?
> 5
> Low
> Sorry , you are to
On 10/01/17 00:54, Deborah Swanson wrote:
Since I won't change the order of the records again after the sort, I'm
using
records.sort(key=operator.attrgetter("Description", "Date"))
once, which also works perfectly.
So both sorted() and sort() can be used to sort namedtuples. Good to
know!
A
On 10/01/17 03:02, Deborah Swanson wrote:
Erik wrote, on January 09, 2017 5:47 PM
IIRC, you create it using a list comprehension which creates the
records. A list comprehension always creates a list.
Well no. The list is created with:
records.extend(Record._make(row) for row in rows)
No
Hi,
On 13/01/17 22:26, daviddsch...@gmail.com wrote:
The issue I am having is that when i enter the sentinel value of QUIT, it gets
initialized as the name and printed out. How can I get around this?
If I understand the question correctly (which looks like it's just a
re-worded homework que
[Replying to direct email. David - please respond to the list so that
you can receive other people's suggestions also]
Hi David,
On 14/01/17 15:30, David D wrote:
> 1) No this is not homework, I am doing this all on my own.
In that case I apologise - I gave you the benefit of the doubt though
Hi,
On 15/01/17 19:58, David D wrote:
I am creating a parent class and a child class. I am inheriting from
the parent with an additional attribute in the child class. I am
using __str__ to return the information. When I run the code, it
does exactly what I want, it returns the __str__ informa
Hi Steven,
On 17/01/17 07:05, Steven D'Aprano wrote:
I wish to emulate a "final" class using Python, similar to bool:
[snip]
It doesn't have to be absolutely bulletproof, but anyone wanting to subclass my
class should need to work for it, which hopefully will tell them that they're
doing som
On 27/01/17 21:36, MRAB wrote:
"loose"? Don't you mean "lose"? (Or possible "lack"?)
Don't you mean 'Or possibly "lack"'?
https://en.wikipedia.org/wiki/Muphry%27s_law ;)
E.
--
https://mail.python.org/mailman/listinfo/python-list
On 29/01/17 14:42, Steve D'Aprano wrote:
1. for...else is misspelled, and should be for...then;
2. Same for while...else;
I don't think I'll ever agree with you on this one.
"then", to me, implies the code following it is always executed.
"else" implies it's conditional.
In those constructs
On 30/01/17 02:14, Steve D'Aprano wrote:
On Mon, 30 Jan 2017 10:52 am, Erik wrote:
It would be even better if it was "else if not break:" to make the
meaning clearer.
break is not the only way to exit the for loop
Fine - "else if not break or raise or return:"
On 01/02/17 23:20, Wildman via Python-list wrote:
On Wed, 01 Feb 2017 21:29:00 +, Chris Green wrote:
Wildman wrote:
On Wed, 01 Feb 2017 19:15:13 +, Chris Green wrote:
OK, no problem, but isn't it very non-portable?
I don't see why not. It should work on any system
that has Python3
On 02/02/17 02:05, MRAB wrote:
Both suggestions are a little long-winded. Couldn't we just abbreviate
them to "else:"? :-)
You are not wrong ;)
E.
--
https://mail.python.org/mailman/listinfo/python-list
On 02/02/17 01:41, Chris Angelico wrote:
On Thu, Feb 2, 2017 at 10:49 AM, Erik wrote:
Well, _logically_ there is a flag (in as much as it could be thought of like
that to make it easy to understand - and in C, that's pretty much what you
have to actually do unless you really want to use
On 01/04/16 15:34, Marko Rauhamaa wrote:
Chris Angelico :
*A range object is not an iterator.*
We now have learned as much.
However, doesn't that extra level of indirection seem like an odd
choice?
If you write your own class which has an __iter__ method, would you expect:
>>> o = MyCla
Hi Loop.IO,
On 03/04/16 15:41, Loop.IO wrote:
If you don't want the user to enter anything, then I explained how
before, just use:
name='C:\\Documents\\PythonCoding\\launch2.bat'
if that's the file name you need.
--
Bartc
Hi Bartc, i tried that, didn't work
FYI, for the future.
Te
Hi Anthony,
On 03/04/16 16:06, anthony uwaifo wrote:
please i need help with this assignment. I have written a code and i still
get an error. please help me debug my code.
We see this assignment come up a lot. The "tutor" list is a better place
to go, but well done for at least attempting it
On 03/04/16 20:54, Loop.IO wrote:
The original post said what did happen, the code runs and hangs on
the create file, and once i press Enter it then finishes and creates
the file, not sure how you missed that but thanks
Yes, I read your original post. That was days ago.
The comment I was reply
Loop.IO:
On 03/04/16 21:25, Loop.IO wrote:
On Sunday, April 3, 2016 at 9:15:22 PM UTC+1, Erik wrote:
On 03/04/16 20:54, Loop.IO wrote:
The original post said what did happen, the code runs and hangs on
the create file, and once i press Enter it then finishes and creates
the file, not sure how
On 03/04/16 22:49, Loop.IO wrote:
You now seem to be on some sort of rampage
I offered you some valuable advice.
*plonk*
E.
--
https://mail.python.org/mailman/listinfo/python-list
Hi Maurice,
On 05/04/16 21:54, Maurice wrote:
Hi. I working on a project where I have 5 scripts loading the same
file at the very beginning so I would like to know the best way I can
get this file without having to compute it 5 times.
I also perform, in all the scripts, a list comprehension usi
Hi Muhammad,
On 05/04/16 22:49, Muhammad Ali wrote:
Would any one paste here some reference/sample python code for such extraction
of data into text file?
You haven't really explained what you want to achieve. What is the input
format, what is the output format, what constraints are there on
On 16/04/16 23:02, Joel Goldstick wrote:
On Sun, Apr 17, 2016 at 3:12 AM, Mel Drosis via Python-list
wrote:
My phone my accounts my home network have all been affected because of someone
using coding from Python and Linux and GitHub and json. I don't even know what
this stuff is but how do I
On 02/05/16 22:30, moa47...@gmail.com wrote:
Can someone help me understand why or under what circumstances a list
shows pointers instead of the text data?
When Python's "print" statement/function is invoked, it will print the
textual representation of the object according to its class's __str
On 20/05/16 00:51, Gregory Ewing wrote:
It's not so bad with "else" because you need to look back
to find out what condition the "else" refers to anyway.
With my tongue only slightly in my cheek, if it was desirable to
"fix"/clarify this syntax then I would suggest adding some optional
(exist
On 20/05/16 01:06, Steven D'Aprano wrote:
In my experience, some people (including me) misunderstand "for...else" to
mean that the else block runs if the for block *doesn't*. It took me the
longest time to understand why this didn't work as I expected:
for x in seq:
pass
else:
print("
On 21/05/16 11:39, Steven D'Aprano wrote:
Just for the record, that's not my mental model *now*.
Sure. And I should have written "one's mental model" - the model of
anyone writing that code (not you personally) who thought the same at
the time.
It took me a long time to work out what for..
On 25/05/16 11:19, Steven D'Aprano wrote:
On Wednesday 25 May 2016 19:10, Christopher Reimer wrote:
Back in the early 1980's, I grew up on 8-bit processors and latin-1 was all
we had for ASCII.
It really, truly wasn't. But you can be forgiven for not knowing that, since
until the rise of the
On 26/05/16 02:28, Dennis Lee Bieber wrote:
On Wed, 25 May 2016 22:03:34 +0100, Erik
declaimed the following:
Indeed - at that time, I was working with COBOL on an IBM S/370. On that
system, we used EBCDIC ASCII. That was the wierdest ASCII of all ;)
It would have to be... Extended
On 26/05/16 10:20, Marko Rauhamaa wrote:
ASCII has taken new meanings. For most coders, in relaxed style, it
refers to any byte-oriented character encoding scheme. In C terms,
ASCII == char *
Is this really true? So by "taken new meanings" you are saying that it
has actually lost all mea
On 26/05/16 08:21, Jussi Piitulainen wrote:
UTF-8 ASCII is nice
UTF-16 ASCII is weird.
I am dumbstruck.
E.
--
https://mail.python.org/mailman/listinfo/python-list
On 22/06/16 04:40, Elizabeth Weiss wrote:
I am a little confused as to how this is False:
False==(False or True)
Other people have explained why the expression evaluates as it does -
the sub-expression "False or True" evaluates to True (as one of the
operands is truthy). Your expression then
On 29/11/15 21:36, Mr Zaug wrote:
I need to use re.sub to replace strings in a text file.
Do you? Is there any other way?
result = re.sub(pattern, repl, string, count=0, flags=0);
I think I understand that pattern is the regex I'm searching for and
repl is the thing I want to substitute for
On 30/11/15 08:51, Jussi Piitulainen wrote:
Surely the straight thing to say is:
>>> foo.replace(' CONTENT_PATH ', ' Substitute ')
'foo bar baz spam Substitute bar spam'
Not quite the same thing (but yes, with a third argument of 1, it would be).
But there was no guarantee of spaces
On 01/12/15 05:28, Jussi Piitulainen wrote:
A real solution should be aware of the actual structure of those lines,
assuming they follow some defined syntax.
I think that we are in violent agreement on this ;)
E.
--
https://mail.python.org/mailman/listinfo/python-list
On 01/12/15 21:37, Denis McMahon wrote:
The assignment succeeds. That's imo a bug. If it's a TypeError to try and
assign a value to tup[1], then tup[1] should not allow the mutated list
to be assigned.
Nothing got assigned.
That original list object remains in that slot. However, it has been
Apologies for self-replying,
On 01/12/15 22:34, Erik wrote:
what you're asking for is that
the *container* object whose element is being assigned to is first
queried as to whether it will accept a mutated element being assigned to
it before that element is mutated.
What I said abo
On 01/12/15 23:28, Ian Kelly wrote:
What about transfers that are initiated by neither?
scp remote_host1:path/to/file remote_host2:path/to/destination
Regardless of how the transfer is invoked, in traditional parlance the
source uploads, the target downloads.
Why is this on the Python list?
On 02/12/15 01:02, Steven D'Aprano wrote:
On Tue, 1 Dec 2015 08:15 pm, Grobu wrote:
# -
>>> def test(arg=[0]):
... print arg[0]
... arg[0] += 1
Awesome!
Hideous!
using a mutable default as static storage.
Exposing something a calle
On 05/12/15 20:27, Mark Lawrence wrote:
On 05/12/2015 19:51, Robert wrote:
On Saturday, December 5, 2015 at 2:29:28 PM UTC-5, Peter Pearson wrote:
On Wed, 2 Dec 2015 14:44:30 -0600, Ian Kelly
wrote:
On Wed, Dec 2, 2015 at 2:37 PM, Robert wrote:
[snip]
ss0="1, 2, 4, 8, 16".split(", ")
[sni
Hi Tony,
On 07/12/15 18:10, Tony van der Hoff wrote:
A highly contrived example, where I'm setting up an outer class in a
Has-a relationship, containing a number of Actors. The inner class needs
to access a method of the outer class; here the method get_name.
Generally, an object should not ne
Hi Robert,
On 08/12/15 01:39, Robert wrote:
I don't find a way to show __next__ yet.
Can we explicitly get the iterator for a list?
Thanks,
Excuse me. I find it as the following:
xx.__iter__().next
Out[16]:
xx.__iter__().next()
Out[17]: 1
Robin has told you how things work under the hood
On 08/12/15 01:50, Robert wrote:
One example, see below please, is in the above mentioned link. I don't see
the purpose of the example.
OK, so there are two parts to this.
The first, is "how do I iterate over something". The answer to that is
using "for" or using "iter()" followed by zero or
x27; Lahn wrote:
Erik wrote:
^^^^
Please fix, Erik #75656.
Fixed(*)
Thomas 'PointerEars', you have chosen to selectively quote snippets of
code and comments out of context, so I think it's futile to respond to
those arguments individually. The original request (if you read it
Hi,
On 11/12/15 23:19, phamton...@gmail.com wrote:
Can anyone direct me in the direction where to start the code for the
randomized of the ball to start.
Your questions over the last week or so appear to be homework
assignments. However, I'll give you a hint: in the interactive
interprete
Hi,
On 11/12/15 23:19, phamton...@gmail.com wrote:
Can anyone direct me in the direction where to start the code for the
randomized of the ball to start.
Your questions over the last week or so appear to be homework
assignments. However, I'll give you a hint: in the interactive
interprete
Hi Pedro,
It would be _really useful_ if you included code that could be pasted
into an interpreter or file directly to show your problem. You are
referencing several data sources ("satellite_dataread" and "list2") that
we can only guess at.
On 12/12/15 21:48, Pedro Vincenty wrote:
Hello, I'm w
Hi Robert,
On 12/12/15 23:01, Robert wrote:
I want to use pydoc as some online tutorial shows, but it cannot run as
below. What is wrong?
"some online tutorial"?
import pydoc
pydoc
Correct - in the interactive interpreter, typing the name of an object
prints its value. You have imported
On 12/12/15 23:08, Robert wrote:
In fact, I wanted to run the following code. When it failed, I moved to
the original question above.
How did it fail? Tell us what _did_ happen.
It works fine for me:
$ pydoc module1
Help on module module1:
NAME
module1
FILE
/tmp/robert/module1.py
D
Hi Robert,
On 13/12/15 00:04, Robert wrote:
Excuse me for the incomplete information on previous posts.
Here is the message when I run it on Canopy (module1.py and module2.py
are in the current folder):
Welcome to Canopy's interactive data-analysis environment!
with pylab-backend set to: qt
T
On 13/12/15 00:19, Robert wrote:
It turns out that Enthought does not allow pydoc as the link said:
http://stackoverflow.com/questions/12063718/using-help-and-pydoc-to-list-python-modules-not-working
I don't think that's what the article is telling you. Try what I said in
my previous message.
On 13/12/15 20:05, KP wrote:
On Sunday, 13 December 2015 11:57:57 UTC-8, Laura Creighton wrote:
In a message of Sun, 13 Dec 2015 11:45:19 -0800, KP writes:
Hi all,
f = open("stairs.bin", "rb") data = list(f.read(16)) print data
returns
['=', '\x04', '\x00', '\x05', '\x00', '\x01', '\x00', '
On 13/12/15 20:28, Erik wrote:
When you call "print", then the list class's __repr__() method is called
which in turn calls the contained objects' __repr__() methods in turn
I mean the __str__() method, not __repr__() in this case - however, the
answer is otherwise the
Hello Thomas,
On 19/12/15 18:32, Thomas 'PointedEars' Lahn wrote:
> (and you should seriously
> consider upgrading Windows or even better, to switch to a real operating
> system, like GNU/Linux
On 20/12/15 08:28, Thomas 'PointedEars' Lahn wrote:
> Anyhow, *I* was not intending to start an OS fla
On 24/12/15 19:36, malitic...@gmail.com wrote:
you are right chris
it is a homework, but we are to figure out the solution first , all we need is
some guidance please and not to be spoon fed like many thought
From your response, it seems that this is a homework question that a
group of you ar
Hi,
I appreciate that you've made an effort this time to write some code,
but have you attempted to try to _execute_ any of this? [I can see that
the answer must be "no"]
On 25/12/15 23:09, princeud...@gmail.com wrote:
> #my solution is:
> def manipulate_data(dic,dict_data =
{'name':'prince'
On 27/12/15 15:02, lee wrote:
the code i have tested base on Cameron's code
def manipulate_data(kind, data):
if kind == 'list':
return list(data)[::-1]
elif kind == 'set':
return set(data)
elif kind == 'dictionary':
return dict( data)
manipulate_data("list", ran
On 27/12/15 20:32, Prince Udoka wrote:
thanks mr cameron simpson, finally at i got the solution, God bless you:
def manipulate_data(kind, data):
if kind == 'list':
for data in [1, 2, 3, 4, 5]:
return data.reverse()
elif kind == 'set':
for data in {"a", "b"
On 11/01/16 23:26, Skip Montanaro wrote:
If I change the last line of find_problems to call
prob_dates.update(), the message disappears. Why is pylint (1.4.2 BTW)
complaining that the prob_dates argument of find_problems is unused
when I use the |= operator?
Is it complaining about that, or is
On 12/01/16 07:13, Cameron Simpson wrote:
On 11Jan2016 23:55, Erik wrote:
Is it complaining about that, or is it because the 'for' loop body
might be executed zero times?
The former. Almost any loop _might_ be executed zero times. Compilers
and linters etc should only complain i
Apologies for self-replying
On 12/01/16 08:24, Erik wrote:
On 12/01/16 07:13, Cameron Simpson wrote:
The former. Almost any loop _might_ be executed zero times. Compilers
and linters etc should only complain if they can prove the loop is
always executed zero times.
I was just raising the
1 - 100 of 988 matches
Mail list logo