e advantage of Alan's "put it in a list" approach is that you could separate
the seaching of the CSV into one function returning a list, and then do
whatever you want (eg print it to your file) as a wholy separate operation.
Cheers,
Cameron Simpson
_
("i:", i)
whoisVAR = os.popen("whois -H " + i + " |egrep
-i \"name|country|mail\" |sort -u").read()
Again, here you are running a shell pipeline which could be done in Python.
Look at the subpr
On 11Mar2016 21:31, boB Stepp wrote:
I must be bored tonight. I have to confess that when copying and
pasting from the interpreter into a plain text email, I often find it
cluttered to confusing by all the ">>>..." that can result from nested
quoting. So I poked around on the Internet and foun
UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_ALL=
I think my terminal might be Unicode friendly...
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
pythonanywhere? All of this works fine with utf-8 there.
Sounds like codeanywhere is an 8-bit environment. Maybe ISO8859-1 (untested
assumption).
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscriptio
On 12Mar2016 00:46, boB Stepp wrote:
On Fri, Mar 11, 2016 at 11:02 PM, Cameron Simpson wrote:
0x25ba BLACK RIGHT-POINTING POINTER
So it seems that your environment has chosen to transcribe your chr(26) and
chr(16) into some glyphs for display, and matched those glyphs with suitable
Unicode
ll on one line, BTW, in case your email reader
folds things up.)
So you might think: but then the shell _will_ see the "<" redirection! But of
course that is the shell on the remote machine, and your script isn't on that
machine, so the shell emits the error message you saw.
tion and consider how it may help.
If you come back with further queries, please include a cut/paste transcript of
the your program's code, and a run of it with the output. (NB: cut/patse the
text, don't attach a screenshot.)
Cheers,
Cameron Simpson
_
gdbm-dev, lzma-dev, libssl-dev, libreadline-dev,
zlib1g-dev.
Then do a clean configure again and see what it says.
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On 03Jan2017 17:07, Peter Otten <__pete...@web.de> wrote:
Cameron Simpson wrote:
On 02Jan2017 17:21, MR ZenWiz wrote:
I'm trying to install python 4.6 on my Xubuntu 16.04 desktop, [...]
INFO: Can't locate Tcl/Tk libs and/or headers
You lack the tk development libraries and
l $HOME/bin directory, or source the venv's
"activate" file from your shell's profile (this making the venv searched ahead
of the system paths), etc.
Or your launcher might simply invoke:
$HOME/path/to/your/venv/bin/python you
ower case at 96 (2^6 + 2^32). Those values look rounder in base 16:
0x40 and 0x60.
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
TF-16 or UTF-32?
No, different machines order the bytes in a larger word in different orders.
"Big endian" machines like SPARCs and M68k etc put the most significant bytes
first; little endian machines put the least significant bytes first (eg Intel
architecture machines). (Asid
right thing to do. If you find yourself
doing this, chances are you're trying to fix the wrong thing. You
only need to escape strings when passing them to something that
will be interpreting a line of text. Such as a piece of shell script.
You should not need it to pass strings to something th
y, no. pathList[j] can contain either .mp3 files or .flac
> files.
Except that I thought this was inside the if-statement, so you know that this
time it is an mp3.
Cheers,
--
Cameron Simpson
Trust the computer industry to shorten Year 2000 to Y2K. It was this
thinking that caused the pro
oin(indir,f),os.path.join(
> outdir,
>
> get_long_name(get_slice(f))+"_-_"+get_bn_seq(f)+".jpeg")
> )
I'd preceed the rename() by computing:
oldname = os.path.join(indir,f)
tain TAB character, it will contain
spaces.
Cheers,
--
Cameron Simpson
Wirth's Law: Software is getting slower more rapidly than hardware
becomes faster.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
nce of characters, you can write:
for c in line2:
... collect statistics about c ...
... print report ...
I would collect the statistics using a dictionary to keep count of
the characters. See the dict.setdefault method; it should be helpful.
Cheers,
--
Cameron Simpson
... in '59
On 22Mar2014 00:04, Mark Lawrence wrote:
> On 21/03/2014 21:39, Cameron Simpson wrote:
> >On 21Mar2014 20:31, Mustafa Musameh wrote:
> >
> >I would collect the statistics using a dictionary to keep count of
> >the characters. See the dict.setdefault m
in Ks:
> print sum(counters.itervalues())
This prints the same sum as many times as there are keys.
Notice that your print statement has no mention of "k"?
You either want just the "print" with no loop over Ks or you want
the loop, with some expression inside which ch
ually).
- later, if need be, you can change the inner workings of how
ObjNames work without changing the main code, or at least not
much - sometimes not at all
Anyway, that's an ok rule of thumb for when to make a class: when
you have a bunch of operations to do to one type of thing.
C
any
particular function. But it is a good practice to adopt in one's own code.
As you suggest, this keeps the two notions separate by making their use in the
code distinct.
Cheers,
Cameron Simpson
Too young to rest on the weekend, too old to rest during the week.
all the loops. It can at best print the last
line of the file. I do not know what you actaully intend here.
See if any of these suggestions help you progress with your program, and report
back (by replying to this thread) when you have new problems or new questions.
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
zero length strings, etc) are "false", and most other things are "true".
Cheers,
Cameron Simpson
Rugby is a beastly game played by gentlemen; soccer is a gentleman's game
played by beasts; football is a beastly game played by beasts.
- Henry Blaha
__
"wanted"
list and the return statement. The calling code is the same.
To see the difference, put a "print" in "wanted_lines" as the first line of the
for loop. With the "list" version you will see all the prints run before you
get the array back. Wit
od on a string, or
even better: don't you already know the arguments for your "dd"? Just fill them
out directly rather than backtracking from a string.
However, your recipe is very close. Change:
p2 = subprocess.Popen(compress, stdin=p1.stdout, stdout=subprocess.PIPE)
into:
'):
print 'Please enter a yes or no'
[...]
Based on the suggested change earlier, this loop should then be followed by:
endProgram = (endProgram == 'yes')
to get a Boolean value for the loop control variable "endProgram".
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
melcase in Python names is class names "This
That".
It doesn't affect your code in any functional way, but others will find you
code slightly more readable.
These common conventions are outlined in PEP 8:
http://legacy.python.org/dev/peps/pep-0008/
Worth a read. It is o
On 13Jun2014 12:28, Cameron Simpson wrote:
snap_path = os.path.join(VXGEN_DIR, snapName)
backupList.append(snap_name)
Sorry, "snap_path" in both lines:-(
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe
y a tuple later" effect, just write it all with lists; it
will be simpler. You can always come back later after the code is functioning
correctly and think about tuples.
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Not a fix, but I for one always start at the index:
https://docs.python.org/3/genindex.html
(or the python 2 version) for ad hoc stuff.
For speed and convenience I always have a fairly current copy of the docs on my
desktop, making browsing them near instant.
--
Each new user of a new syst
n't helped.
os.system should be documented in the "os" module.
But it just takes a shell command, so aside for handling the fork/exec-of-"sh
-c your_command"-wait, there is little to document.
Cheers,
Cameron Simpson
__
from Python?
os.chdir("the/proper/directory")
os.system("/bin/activate")
Because "activate" needs to be sourced by the shell. It hacks the environment.
Cheers,
Cameron Simpson
If at first you don't succeed, your sky-diving days are over.
- Paul
.
When searching for doco on particular functions I find the Index is a good
place. Go to the "S" section and find "system"; there should be a link directly
to the relevant doc section.
Cheers,
Cameron Simpson
In theory, there is no difference between theory and practice.
I
your pain. Eg:
#!/bin/sh
. /path/to/venv/bin/activate
exec "${SHELL:-/bin/sh}"
Cheers,
Cameron Simpson
Many are stubborn in pursuit of the path they have chosen, few in pursuit
of the goal. - Friedrich Nietzsche
___
Tutor maillist - Tu
e and does whatever.
Next time the for loop iterates the "fibonacci" function runs again, briefly,
until the next "yield".
I hope this helps you visualise the process.
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
supplying some code without any accompanying text isn't very helpful to
the people who may help you.
Thanks,
Cameron Simpson
... It beeped and said "Countdown initiated." Is that bad?
___
Tutor maillist - Tutor@python.org
To unsubs
r things (often by getting good at stitching your smaller
things together). You'll always need to consult doco for specifics and for
anything new. Don't worry too much about that.
Cheers,
Cameron Simpson
Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.
- H
rog/Python/breezygui;
. ./bin/activate; gnome-terminal"])
That is only one line, in case some mail program breaks it up.
If you were using another terminal emulator it might be worth putting more work
into getting stuff done after starting the emulator rather than before, but IMO
gnome-ter
blem that you expect.
Cheers,
Cameron Simpson
An ambassador is a man of virtue sent to lie abroad for his country; a news-
writer is a man without virtue who lies at home for himself.
- Sir Henry Wotton, Reliquae Wottonianae
___
Tutor maillist
and, and that form
DOES NOT pass anything to the shell. The command gets executed directly. And
therefore no spaces need escaping at all.
Just getting this out before we further confuse the OP.
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@pyt
>>> print("hi", end=" ")
hi >>>
The "$" is my prompt.
Any Python 3 should accept your print() call.
The default system "python" on most platforms is still Python 2; that may be
misleading you. In particular, if you're runnin
em.
for line_number, row in enumerate(catalog2):
for col, item in enumerate(row):
if lens[col] < len(item):
lens[col] = len(item)
The above code has no indentation. Was it indented when you wrote it?
Cheers,
Cameron Simpson
Having been erased,
The document you're seeking
M
e last line, which would normally be indented further
than the "if".
Cheers,
Cameron Simpson
This information is absolutely reliable; I read it on Usenet somewhere.
- sc...@festival.ed.ac.uk (Scott Larnach)
___
Tutor maillist - Tutor@
is not helped by the fact that for some things the GMail/GGroups HTML
looks ok but the associated plain text version that they generate and send is
usually awful.
Cheers,
Cameron Simpson
A ridiculous place! Leaping from one bump to another, 187 corners or whatever
it was! The number of time
code fragile in one sense, it prevents it _silently_
misinterpreting one thing as another, and that is usually best.
Cheers,
Cameron Simpson
The aim of AI is to make computers act like the ones in the movies.
- Graham Mann
___
Tutor maillist
n two items
in it. We'd need to see to say.
Try this:
for element in row:
print(element)
col, item = element
lens[col].append(len(item))
and see what you get.
Cheers,
Cameron Simpson
Archiving the net is like washing toilet paper! - Leader Kibo
minds me of a programmed cell
of a spreadsheetkind of.
It is very like that, if you consider two spreadsheet columns, the first with
the original values in "lens" and the second having "max(col)" for each.
Cheers,
Cameron Simpson
ERROR 155 - You can&
n the first colon and the trimming the whitespace from the
two piece is simpler and gets you a more reliable parse.
Cheers,
Cameron Simpson
Trust the computer industry to shorten Year 2000 to Y2K. It was this
thinking that caused the problem in the first place.
- Mark Ovens
_
ram and we'll see where we are.
Cheers,
Cameron Simpson
... and that was only one of many occasions on which I met my death,
an experience which I don't hesitate to recommend strongly.
- Baron von Munchausen
___
Tutor maillist - Tuto
tderr=open('stderr.out', 'w')
in your call() call. Then open 'stderr.out' and look for the relevant
information.
Obviously in a "real" program you'd take care to make that a temporary file
with a unique name using the functions from the "tempf
derr now
xit = P.wait()
if xit != 0:
... command was unsuccessful, complain, maybe abort ...
Cheers,
Cameron Simpson
ep0: 3c509 in test mode. Erase pencil mark!
This means that someone has scribbled with pencil in the test area
on the card. Erase the pencil mark a
communicate. Using
.pipe keeps the requirements on me clear and leaves me maximum flexibility to
handle I/O and process completion as I see fit.
As you can see from my example code, it is hardly difficult to use Popen
directly in the OP's use case, and arguably better.
Cheers,
Cameron
nicate and (less so) call is that they do so much.
When a particular part isn't working, figuring out what to fix is harder.
On a tutor list, what's our stance on exploring the operation at a lower level
so the OP gets a better feel for what's going on? I'm aware we don'
ssful, complain, maybe abort ...
Please try adapting your Python code to that and see where you end up.
Put a print statement as the first line in the for-loop so you can see if you
are receiving stderr lines as intended.
Cheers,
Cameron Simpson
As soon as we started programming, we found t
it prepends "$PWD/lib/python" to $PYTHONPATH, as that is
where my modules live. In this way it runs the hacked module instead of running
the "official" version. The OP would prepend "$PWD/lib" in the same scenario.
Cheers,
Cameron Simpson
Invoking t
em to have a dedicated mailing list.
Shakoor, if you get no responses here, ask again on python-list: I know there
are some statistics and floating point savvy people there.
Cheers,
Cameron Simpson
To be positive: To be mistaken at the top of one's voice.
Ambrose Bierce (1842-1914), U
.
If your screenshot is inherently graphical, publish it elsewhere (eg save it to
Dropbox and get a "public link") and mention the link in your post, with some
textual description.
But for text, we like it inline in the message itself.
Cheers,
Cameron Simpson
in rec.moto, jsh w
On 29Aug2014 08:45, Cameron Simpson wrote:
It looks like he's using this:
http://statsmodels.sourceforge.net/
Works in python 2 and 3, but does not seem to have a dedicated mailing list.
Hmm. There's a mailing list here:
https://groups.google.com/forum/?hl=en#!forum/pystatsmodel
ause my laptop has a mail
system which will queue messages and send when I'm online again. But I
_can't_ go and get your URL, because I'm offline.
Please use inline plain text when you can. It helps everyone.
Wow i feel like such an idiot haha. I should have caught that cap
ry. It is often _easy_,
but it leaves your systems at much greater risk.
Cheers,
Cameron Simpson
Please do not send me Microsoft Word files.
http://en.nothingisreal.com/wiki/Please_don't_send_me_Microsoft_Word_documents
___
Tutor maillist -
process1 and or proc.name == process2:
or perhaps:
if proc.name in (process1, process2):
and your psutil.Popen call looks... confused. Popen is a subprocess function,
not part of psutil (I think). And you don't use either "out" or "err" after you
collect them, so why use
en I need an extra terminal
for something short term.
Just recently, I've customised my interactive Python with a powerful set
of tab completion commands, similar to that provided by IPython. While
typing, if I hit tab, it will try to complete the current variable,
function, module or f
On 01Sep2014 23:59, Steven D'Aprano wrote:
On Mon, Sep 01, 2014 at 11:57:08AM +1000, Cameron Simpson wrote:
On 01Sep2014 11:13, Steven D'Aprano wrote:
>Just recently, I've customised my interactive Python with a powerful set
>of tab completion commands, similar to tha
single flat directory.
Cheers,
Cameron Simpson
Knox's box is a 286. Fox in Socks does hacks and tricks
Knox's box is hard to fix. To fix poor Knox's box for kicks.
- David Mar ,
as quoted by John Mackin
___
mpt will help).
3: Please cut/paste your code instead of retyping it. You spell "Subprocess"
above with a capital "S", which it does not have. This leads me to think the
above it not your exact running code.
Cheers,
Cameron Simpson
Nonsense. Space is blue, and birds
st the actualy code and a description of what it seems to be doing
wrong.
Cheers,
Cameron Simpson
Trust the computer industry to shorten Year 2000 to Y2K. It was this
thinking that caused the problem in the first place.
- Mark Ovens
___
Tutor ma
must) access "self" to do its work.
I think you are forgetting that the @decorator action occurs at the time the
class is defined, not at the time the function is called.
Cheers,
Cameron Simpson
More computing sins have been committed in the name of performance,
without necessariliy
my_date))
Seriously, keep that steps all broken out separately like the above. Easier to
read, easier to debug, easier to move relevant parts off into utility functions
later when you need to do this from several places in your code.
Cheers,
Cameron Simpson
If this experiment we're doing wor
os.unlink(some_pathname)
os.rename(this, that)
because a failed operation will raise an exception.
Cheers,
Cameron Simpson
Mike was a sportbike rider, He'd say "El grande numero one!"
With a 'No Fear' sticker on his zx11, he'd lightem'up just for fun...
he same as the loop variable. It is the same in this case because
this is the idiomatic way to select particular values form an existing list.
If we'd wanted the new list to contain double the original values we'd write:
[ pair*2 for pair in values if key == pair[0] ]
Cheers,
Came
On 28Oct2014 21:33, Clayton Kirkwood wrote:
!From: Cameron Simpson [mailto:c...@zip.com.au]
!Let me try a less wordy diagram. You will need to be displaying in a
!constant width font :-)
!
! [ pair for pair in values if key == pair[0] ]
! -- the expression that accrues in the
f" expression is true). So, the
expression in the examples above is true only for the second tuple. So the
expression "pair[1]" is only used for that tuple. And so the final result is a
single element list with a "4", taken from the second tuple.
Maybe this makes thi
fields = line.split() # read a line from "intersectBed" as words
cut_fields = fields[3:8] # get columns 4..8 (counting from zero, not one)
if cut_fields != old_fields:# this does what "uniq" does
print cut_fields
old_fields = cut_fields
P.wait() # finished reading output, wait for process and tidy
up
Hopefully this suggests some ways forward.
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
/327/
Instead you will usually use a call like this:
db_handle.execute("INSERT into Table1 values(?,?)", value1, value2)
and the .execute function will itself call the right SQL quoting function and
replace the "?" for you.
Cheers,
Cameron Simpson
... It beeped and said &q
not available outside the function, and if you use a variable
of that name elsewhere, it too is independent.
Cheers,
Cameron Simpson
Fear the government that fears your computer. - Jon Drukman
___
Tutor maillist - Tutor@python.org
To unsubscri
ybe return
both the offset and line text). That is a byte offset to be used later.
Cheers,
Cameron Simpson
George, discussing a patent and prior art:
"Look, this publication has a date, the patent has a priority date,
can't you just compare them?"
Paul Sut
have now. It is very popular and widely liked.
Cheers,
Cameron Simpson
'Supposing a tree fell down, Pooh, when we were underneath it?'
'Supposing it didn't,' said Pooh after careful thought.
___
Tutor maillist - Tutor@python.or
On 24Nov2014 12:56, Albert-Jan Roskam wrote:
> From: Cameron Simpson
On 23Nov2014 22:30, Albert-Jan Roskam
wrote:
I created some code to get records from a potentially giant .csv file. This
implements a __getitem__ method that gets records from a memory-mapped csv file.
In order for t
, great tip. I just modified some sample code that I post shortly.
Note that the readahead stuff might mank the use of tell() to record the offset
before reading each line.
Cheers,
Cameron Simpson
The first ninety percent of the task takes ninety percent of the time, and
the la
you're
making lots of little updates.
See sig quote.
Cheers,
Cameron Simpson
The Eight Fallacies of Distributed Computing - Peter Deutsch
1. The network is reliable
2. Latency is zero
3. Bandwidth is infinite
4. The network is secure
5. Topology doesn't cha
oolkit and data storage specificly). (2) Get it working in as simple a way as
possible.
The GUI toolkit aside, the rest of it is probably easy to change if needed. But
make it work _first_.
Cheers,
Cameron Simpson
Of course I believe that solipsism is the correct philosophy, but that
t would be unusual for that to be your only choice
unless you have a specific task in mind.
Cheers,
Cameron Simpson
Sometimes the only solution is to find a new problem.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription opti
itself here:
https://www.macports.org/
Then install python 3 by issuing the command:
sudo port install python34
what as I type gets you python 3.4.2. The command:
port search python
found the name "python34" for me towards the bottom of the listing.
Cheers,
Cameron Simpson
Mac OS X. Bec
delay(2000)
def cleanup():
global exitFlag
exitFlag = 1
print "Exit flag value: ", exitFlag
for t in threads:
t.join()
sys.exit()
Cheers,
Cameron Simpson
Out of memory.
We wish to hold the whole sky,
But we never will.
- Haiku Error Messages
ted word boundaries and nongreedy matches. You don't need
them.
Use this:
\([a-zA-Z]\w*\)(\([^)]*\))
which matches any "foo(blah)".
Then look at the returned match object and check that .group(1) == "t".
Cheers,
Cameron Simpson
I heard a funny one this weekend
ings I cannot be sure - it may just be a mistake
- but "job.py" defines a class "Jobs". In "trial.py" you use the name "Job".
Not the same!
Cheers,
Cameron Simpson
Beware of bugs in the above code; I have only proved it correct, not tried it.
- Donald E
uri
@property
def key(self):
return self.method, self.uri
Here the .key property happens to be a (method, uri) tuple. Might change in the
future if that is not enough to uniquely identify the node.
Cheers,
Cameron Simpson
Surely it was of this place, now Cambridge but formerly known
On 24Jan2015 00:47, Alan Gauld wrote:
On 24/01/15 00:37, Cameron Simpson wrote:
By contrast, I use it a far bit (though still far less than non-property
methods). Generally for derived properties which are:
- cheap to compute i.e. O(1)
- which I want to abstract
- usually represent some
On 24Jan2015 09:16, Alan Gauld wrote:
On 24/01/15 01:50, Cameron Simpson wrote:
On 24Jan2015 00:47, Alan Gauld wrote:
But why a property rather than a simple method?
Because it is a value that feels like an attribute.
OK, Having seen Dannys reply as well as yours I guess I see the
On 24Jan2015 15:03, Mark Lawrence wrote:
On 24/01/2015 01:50, Cameron Simpson wrote:
My intuition is that a function is costly (potentially) and that
consulting an attribute is very cheap. I don't want to break such
intuition.
It's not just your intuition, it's a fact. Fun
hostname
That gets this machine's hostname. The OP wants to use an arbitrary machine's
hostname, since he's looking up an asset db. He needs to use the sys.argv
array. (We he's doing as it turns out, so not to worry.)
Cheers,
Cameron Simpson
I must really get a thi
ardwired, not
obtained from elsewhere in any form.
Like all sane people, I consider using exec() a code smell: if you're using it
you should consider heavily alternatives to it.
Cheers,
Cameron Simpson
I think... Therefore I ride. I ride... T
irtualenv directory, avoiding conflicts with other systems
like OSX or MacPorts. This is great for experimentation of maintaining special
setups of your own.
You can base the virtualenv of any of the installed Pythons (OSX, MacPorts,
whatever), to get the installed libraries for free.
Please
:
# at start of script:
counts = {} # dict of counter based on port (or better, (device, port))
# when new device seen (nb: possibly print out accumulated prior count value)
count[port] = 0
# when new error seen
count[port] += 1
Chase CSV as a totally separat thing later; just use print()
be in the context of "in Python", no
other quibbles.
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
rious kinds come into play: an external
process of some kind which monitors the primary process (or something it
manages), and take action if the primary process goes away or some activity
does not occur for a period.
Cheers,
Cameron Simpson
Cordless hoses have been around for quite some ti
t
[0, 1, 2, 4, 5]
>>>
The assignment has no return value.
The .sort() call returns None, so the interpreter prints nothing.
The expression "a_list" is of course the list, which is printed.
Just to be glaingly obvious about this aspect of the interactive interpreter:
>>>
is page:
http://pycurl.sourceforge.net/doc/unicode.html
which looks like it ought to discuss your problem.
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
n more normally
and just name in instead of inlining a lambda. But sometimes (rarely) that
makes for harder to read code structure (though easier to read function
internals).
Anyway, faced with a desire to use a lambda here, I would choose a tuple.
Cheers,
Cameron Simpson
This is my sim
101 - 200 of 360 matches
Mail list logo