set(['c', 'b', 'a'])
The language does not say these will get the same iteration order. It
happens that the Python you're using, today, does that.
You can't learn the language specification from watching behaviour;
you learn the guarrenteed behaviour
em I'd be running the process under strace (or
dtrace or ktrace depending on flavour) to see what actual OS system calls are
being made during this behaviour. Is this feasible for you?
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
A slipping sear could let your M203 gre
On 06May2012 09:18, Bob Cowdery wrote:
| On 05/05/2012 23:05, Cameron Simpson wrote:
| > On 05May2012 20:33, Bob Cowdery wrote:
| > | [...] calls to time.time() always return the same
| > | time which is usually several seconds in the past or future and always
| > | has no fra
emp.append((parser.parse(line[0]), float(line[1])))
print "after read loop", time()
and so on. AT least then you will have more feel for what part of your
code is taking so long.
Ceers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
The shortest path between any
On 06May2012 17:10, Chris Rebert wrote:
| On Sun, May 6, 2012 at 4:54 PM, Cameron Simpson wrote:
| > On 06May2012 18:36, J. Mwebaze wrote:
| > | > for filename in txtfiles:
| > | > temp=[]
| > | > f=open(filename)
| > | > for line in f.readlines():
| &
| > 3) Run the Perl commands in parallel (to take less time)
|
| multiprocessing? Though your problem may be I/O-bound.
If he stuffs the inputs into TemporaryFiles he can attach them to
subprocess.Popen() stdin and just not wait. Dispatch them all and collect
afterwards. Only tempfile and subprocess needed; no ne
On 07May2012 11:02, Chris Angelico wrote:
| On Mon, May 7, 2012 at 10:31 AM, Cameron Simpson wrote:
| > I didn't mean per .append() call (which I'd expect to be O(n) for large
| > n), I meant overall for the completed list.
| >
| > Don't the realloc()s make it O(n^
nts... intellectual property goes by other rules I think.
Patents _are_ IP. You may mean "copyright", also IP. Copyright goes to
the author, except that most companies require employees to assign it to
the company, including the Berne Convention "moral rights" (such as
attribution).
he message. [...]
| I've already forwarded a bounce to ab...@azet.sk but have heard
| nothing back. This isn't the list's fault, but maybe the listowner can
| deal with the spam coming back.
Try "postmaster". I'm not sure "abuse" is so widely implemented.
--
Cameron S
no_save=no_save,
maildb_path=os.environ['MAILDB'],
maildir_cache={})
This removes a lot of guff from some common procedures.
Hope this helps,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
There's a fine line between pathos and pathetic.
- David Stivers s...@stat.rice.edu DoD #857
--
http://mail.python.org/mailman/listinfo/python-list
tion
stuff.) My "O" class (back in the thread) deliberately shows only the
[a-z]* attributes so the user gets the public object state without the
noise of private attributes.
For __repr__ I might print everything. Haven't gone that far yet.
Cheers,
--
Cameron Simpson DoD#743
h
badopts=1
;;
*)break ;;
esac
shift
done
# ... parse non-option arguments ...
[ $badopts ] && { echo "$usage" >&2; exit 2; }
# ... rest of program ...
There's nothing hard there.
Cheers,
--
Cameron Simpson DoD#743
http:/
wanted to add and remove handlers a lot I might well
expect (or at least imagine) it to be a set.
So I too find:
root.handlers[-1]
a risky thing to say, and harder to read because it assumes something I
would not want to rely on. Versus the original proposal that avoids all
need to know how log
I hope someone's validated that regexp before using it to validate email
addresses:-) I'm amazed. (And amazed that the sheer code smell doesn't
drive the author away from suggesting it.)
The mere presence of nesting comments in RFC2822 addresses prevents
using a single regexp to parse them
cluding nesting comments. Regexps don't do
recursion.
| Can anyone tell me how to use this and what is the meaning of
| this
| \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
If you don't understand it, DON'T use it. And in any case, it is
simplistic (== wrong). As pointed out by
you refuse to accept the e-mail address at
| which the reeive e-mail all day every day.
And it will get better. If the validation code is sufficiently
widespread, the user may be unable to complain or report the issue.
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
Don't have
ey:
I spent a brief while confused that this doesn't work:
o = object()
o.x = 1
and that I needed to do this:
class O(object):
pass
o = O()
o.x = 1
until I realised that plain "object", the root of all classes, doesn't
accept arbitrary attributes. But subclasse
trictive mode to os.open and
open it up with fchmod.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
It was a joke, OK? If we thought it would actually be used, we wouldn't have
written it! - Marc Andreessen on the creation of a tag
--
http://mail.python.org/mailman/listinfo/python-list
On 09Jun2012 07:42, Neal Becker wrote:
| Cameron Simpson wrote:
| Doesn't anyone else think it would be a good addition to open to specify a
file
| creation mode? Like posix open? Avoid all these nasty workarounds?
-1
open() is cross platform.
os.open() is platform specific, generally
On 09Jun2012 18:25, Neal Becker wrote:
| I haven't seen the current code - I'd guess it just uses posix open.
| So I would guess it wouldn't be difficult to add the creation mode argument.
| How about call it cr_mode?
What shall it contain on Windows?
What shall it contain on Jyth
ectly, or raise a ValueError if it is supplied
and not whatever means "default open".
A huge -1000 for arguments that have meaning but are ignored.
This is why I'm -1 to start with: a file permission bitmap is a
posix.open() value. It does not map portably to the genera
priority queue where the lowest time is the next
| > to be retrieved.
|
| You're right, of course.
Thought I'd point out that a heapq works nicely for this, or it has for
me in this scenario , anyway.
--
Cameron Simpson
--
http://mail.python.org/mailman/listinfo/python-list
lated news, can one make "properties" for modules? I was wondering
about this a month or so ago.
--
Cameron Simpson
If your new theorem can be stated with great simplicity, then there
will exist a pathological exception.- Adrian Mathesis
--
http://mail.python.org/mailman/listinfo/python-list
[Drafted by Gabriel Genellina.]
QOTW: "'Reminds me of the catch-phrase from the first Pirates of the
Caribbean movie: 'It's more of a guideline than a rule.'" - Tim
Roberts,
2011-05-27, on the "mutator-methods-return-None"
Announcing two maintenance releases (including security fixes):
2.5.
no, wrong suggestion.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
Dangerous stuff, science. Lots of us not fit for it.
- H.C. Bailey, _The Long Dinner_
--
http://mail.python.org/mailman/listinfo/python-list
[Originally drafted by Gabriel Genellina.]
QOTW: "Well, it's incompatible with the Python compiler I keep in my
head. Have
these developers no consideration for backward-thinking-
compatibility?"
(Ben Finney, 2011-06-10, on certain old but not-so-obvious change)
Python versions 2.7.2 and 3
d rather
| not use either one. The more levels of indentation in a module, the
| harder it is to follow. And exceptions really should not be involved
| in execution flow control, but in the handling of abnormal situations
| instead.
|
| Considering that other complex statements have special flo
lines of generators' "raise StopIteration".
Then the import machinery can catch it, no new keyword is needed and no
existing keyword needs feature creeping.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
And it is not our part here to take th
On 18Jun2011 03:50, Steven D'Aprano
wrote:
| On Sat, 18 Jun 2011 12:36:42 +1000, Cameron Simpson wrote:
| > Just to throw another approach into the mix (because I was thinking
| > about the "finally" word), what about:
| >
| > raise StopImport
| >
| > alon
On 21Jun2011 20:04, I wrote:
| So the caller does an:
|
| import foo
|
| as normal, with no special wrapping. And the module goes:
|
| spam()
| if condition:
| raise StopIteration
| ham()
| cheese()
Of course, that should be StopImport, not StopIteration.
Cheers,
--
Cameron
On Jun 24, 6:45 am, "neil.suffi...@gmail.com"
wrote:
> You might also want to have a look at Pisa (http://www.xhtml2pdf.com/
> ) . It's based on reportlab but might suit you better.
There's more to the story. As with many things, the answer is, "it
depends".
In this case, there are so many varia
course) that I can make
| >it automatically run at a set time each night?
|
| Use your operating system's facilities to run timed jobs.
|
| Unix/Linux: Cron jobs
| Windows: Scheduled Tasks
| Mac: don't know, but probably Cron too
Yep. Macs are UNIX, BSD derived.
--
Ca
n you guys recommend?
|
| BTW, I'll likely be sticking with Mercurial for revision control.
| TortoiseHg is a wonderful tool set and I managed to get MercurialEclipse
| working well.
I'm using bitbucket and liking it. Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/c
blishing
the sentinal's name to your callers i.e. may they really return _MISSING
legitimately from their functions?
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
What's fair got to do with it? It's going to happen.- Lawrence of Arabia
--
http://mail.python.org/mailman/listinfo/python-list
On 15Jul2011 20:17, Steven D'Aprano
wrote:
| Cameron Simpson wrote:
| > I suppose there's no scope for having the append-to-the-list step sanity
| > check for the sentinel (be it None or otherwise)?
|
| It is not my responsibility to validate data during construction, only t
annoying, and problematic if you're using multiple
threads), _and_ you can put meta info inside it, like pid files etc.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
I had a wierd dream with Ken Thompson in it once.
- George Politis
--
http://mail.python.org/mailman/listinfo/python-list
l overwrite
| that memory. I'm afraid of taking up lots of space that I don't need
| with this program.
Don't be.
| The docs indicate that Unix recovers the memory, but I'm not sure about
Windows.
I confess to disliking Windows, but I do not believe it is that broke
n the same file for write more than once (hence
the umask 0777 thing, to prevent that); secondly you can put stuff in it
though that makes removing the directory more work when you're done with
it.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
THE LOST WORLD is based
kay, we've come up with the solution of a new exception, PauseIteration,
| that the iterator protocol will recognise.
One might suggest that Billy could wrp his generator in a Queue(1) and
use the .empty() test, and/or raise his own PauseIteration from the
wrapper.
--
Cameron Simpson DoD#743
know it is, being so myself. You haven't yet reached that
happy state.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
Will you come quietly, or shall I use earplugs?
--
http://mail.python.org/mailman/listinfo/python-list
On 16Jul2011 19:29, Andrew Berg wrote:
| Of everything I've read on tabs vs. spaces, this is what makes the most
| sense to me:
| http://www.iovene.com/61/
Makes sense to me. Thanks for the URL. Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
Every particle continu
On 17Jul2011 13:09, Steven D'Aprano
wrote:
| Cameron Simpson wrote:
| > On 16Jul2011 09:51, rantingrick trolled:
| > | Evidence: Tabs ARE superior!
| > | --
| > | I have begun to believe that tabs are far more superior to space
11. Spreadsheets have
| been around for a LONG time. Stop living the past.
The past was better. Always was and will be increasingly so in the
future. Stop fighting the tide!
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
Pardon my driving, I'm trying to reload.
--
http://mail.python.org/mailman/listinfo/python-list
bah(y)
Adding your syntax causes silent breakage later instead of immediate
syntax error now.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
hybrid rather than pure; compromising rather than clean;
distorted rather than straightforward; ambiguous rather than
articulated;
ions: mandating behaviour is a little pointless - it can't be
enforced, few directives are unambiguously one sidedly good and so
mandating stuff is divisive and will drive people away.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
It's quite difficult to remind people
ge, in not small part
because CSS lacks a "not" - you can't say "style everything except
blah", which means you have to enumerate a bazillion combinations and
you're still playing guessing games.
So, yes, the every author's look'n'feel is gratuitousl
#x27;ll all fall behind.
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
I think... Therefore I ride. I ride... Therefore I am.
- Mark Pope
--
http://mail.python.org/mailman/listinfo/python-list
QOTW: "If an elegant solution doesn't occur to me right away, then I
first
compose the most obvious solution I can think of. Finally, I refactor
it
until elegance is either achieved or imagined." - Neil Cerutti,
2011-07-28
What is the real purpose of __all__?
http://old.nabble.com/__all
QOTW: "If an elegant solution doesn't occur to me right away, then I
first
compose the most obvious solution I can think of. Finally, I refactor
it
until elegance is either achieved or imagined." - Neil Cerutti,
2011-07-28
What is the real purpose of __all__?
http://old.nabble.com/__all
nup code.
It's worth it just to make everything more readable. The fact that it
makes the code smaller and easier to maintain and less bug prone is just
sugar.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
My mind is like a blotter: Soaks it up, gets it
terfaces were initialised.
So getting the LAN first may merely be fortuitous.
I wouldn't rely on it, especially if interfaces come and go.
What if you queried your routing table instead? Usually there's just one
default route, and hopefully it would be configured to use the "best&
On 22Aug2011 04:29, Tomas Lid�n wrote:
| On 22 Aug, 12:06, Cameron Simpson wrote:
| > It would not surprise me if the order was related to the order a scan of
| > the system interfaces yields information, and I would imagine that may
| > be influenced by the order in which the interf
[Original draft by Gabriel Genellina.]
QOTW: "Python is a programming language, not an ice cream shop." -
Steven
D'Aprano, 2011-08-10, on providing the language with just "more
choices"
Comparing the relative speed of `i += 1` and `i = i + 1`
http://groups.google.com/group/comp.lang.
he top level command line program logic is at the top of the file
where it is easy to find, not buried in the middle or at the bottom.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
Anarchy is not lack of order. Anarchy is lack of ORDERS.
--
http://mail.python.org/mailman/listinfo/python-list
form.
Some use a mix of heavyweight (threads with distinct pids) and
lightweight threads.
| But, in Python, only one thread actually ever executes actual Python
| code at any given time.
In CPython this is true. Other implementations like Jython can use
other threading models; I'd expect
uffered regardless). So Steven saw stuff
flushed on newlines and you would see stuff flushed when you explicitly
flush or when the buffer fills (probably doesn't happen for your use
because you need a response, and never write enough to fill the buffer).
Cheers,
--
Cameron Simpson DoD#74
raise IndexError, "%s: got more than one element (%s, %s, ...)" \
% (icontext, it, elem)
if first:
raise IndexError, "%s: got no elements" % icontext
return it
Which I use as a definite article in places where
n just use a boolean if you like. I have plent of loops like:
first = true
for i in iterable:
if first:
blah ...
...
first = False
Cheap and easy. Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
Bye and bye, God caught his eye, - Epitaph for a waiter by
QOTW: "So far as I know, that actually just means that the test suite
is
insufficient." - Peter Seebach, when an application passes all its
tests
http://groups.google.com/group/comp.lang.lisp/msg/29aff9595bb0eac0
Administrative note: it's been a while--since the end of October
2010,
in fact;
QOTW: "Let us cease to nourish those fabled ones who dwell under
bridges." -
Tom Zych
http://groups.google.com/group/comp.lang.python/msg/c1052c962becfc26
Look for "Python Insider" below. Then read through everything
there.
You'll want to know about this one.
Once again, the PSF sp
QOTW: [You'll have to see it for yourself: !Viva 2.7.1!]
http://groups.google.com/group/comp.lang.python/msg/8d79c5ee3913f82d
"De-briefing" is characteristically something we do too little;
there's a LOT of value in systematic examination of what we've
experienced. Unladen Swallow pre
rom my
preferred editor and some terminals (and, under X11, a good window
manager - I like FVWM). That way one can pick the pieces one likes
and use them together.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.ezoshosting.com/cs/
The more I ride the more I notice and the more fearful I beco
QOTW: "Python is a pragmatic language, so all the rules come pre-
broken." - Mel
http://groups.google.com/group/comp.lang.python/msg/208face4a8e00062
Look! In the sky! It's a SciPy demonstration! It's a business!
No, it's ForecastWatch:
http://goo.gl/AvzqZ
EuroPython 201
t 'bc' also has arbitrary precision floating
| point math and a standard math library.
Floating point math? I thought, historically at least, that bc is built
on dc (arbitrary precision integer math, reverse polish syntax) and that
consequently bc uses fixed point math rather than f
[This content provided by Gabriel Genellina, despite what the "From:"
line says.]
QOTW: "Often, the cleverness of people is inversely proportional to
the
amount of CPU power and RAM that they have in their computer.
Unfortunately, the difficulty in debugging and maintaining code is
often
directl
QOTW: "When did we come to the idea that people should be able to
program in
a language without actually learning it? The fact that Python comes
so close
to that possibility is nothing short of revolutionary. I suppose one
day a
reasoning android will be able to sit down at the terminal of a sta
function and catches the
return value or raised exception. Anyone who calls the returned callable
later gets the return value or the exception reraised as appropriate,
so one can avoid the dangerous "catch everything and log" scenario.
Cheers,
--
Cameron Simpson DoD#743
http://www.cskk.e
[This edition drafted by Gabriel Genellina.]
QOTW: "They did a study once to determine the best tool for
development. Turns
out that the most productive tool was generally the one that the user
believed was
the most productive. In hindsight I think that that was rather
obvious." - D'Arcy
J.M. C
ing on the server and some local or something)?
You're on Linux. Install strace and see what:
strace python your-program.py
shows you. Just in case the zip file's being opened with a funny mode or
something. It is always good to be totally sure of exactly what system call is
failin
On 05Sep2017 19:44, Cameron Simpson wrote:
Almost anything which says "Errno ..." is almost always an OSError (or an
IOError as I found the other day). I try to be quite picky about these. So for
example:
Oh yes, and on a UNIX host such as Solaris the command "man 2 intro&
o be quite picky about these. So for
example:
try:
fp = open(filename)
except OSError as e:
if e.errno == errno.ENOENT:
# file missing
... act as if the file were empty ...
else:
# other badness - let the exception escape
raise
Cheers,
Cameron Simpson (
.
This has two advantages:
It means you can turn it off anywhere and next time around the loop will stop,
whereas doing things directly with continue or break requires "structural"
control because they only jump out of the innermost loop, and also they act
right now, preventing other relevant st
first fork() the
process, then exec() the new app. There are a few steps to do this
properly, so google for "python fork exec".
No, subprocess does this stuff for you.
I think the OP's missed some important stuff out.
--
Cameron Simpson
Baseball cards that suck in energy and run
for it to terminate. GUI programs
are not special. Therefore, if your calling python program is blocking, it is
blocking somewhere other that this line of code. Please show us where.
Consider putting print() calls through your code to locate where your program
stalls.
Cheers,
Cameron Simpson (
don't read them then the pipes can fill, stalling the app.
Cheers,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
sion : True and True = True
Correct. (In my head; haven't run the code.)
E) Set bool_five equal to the result of
True and True
Entire Expression : True and True = True
Correct.
Cheers,
Cameron Simpson
ERROR 155 - You can't do that. - Data General S200 Fortran error code list
--
https://mail.python.org/mailman/listinfo/python-list
0 => zero/false
If all this seems confusing I wonder about your understanding of the plain
English words "and" and "or", but your English seems otherwise perfectly fine
to me, so that would be very surprising.
Can you write some plain English sentences where "and"
On 26Sep2017 20:55, Cai Gengyang wrote:
On Wednesday, September 27, 2017 at 6:45:00 AM UTC+8, Cameron Simpson wrote:
On 26Sep2017 14:43, Cai Gengyang wrote:
>C) Set bool_three equal to the result of
>19 % 4 != 300 / 10 / 10 and False
>
19 % 4 = 3 which is equal to 300 / 10 / 10 = 3,
The release script looks for the latest one.
Note that this is all one code repo at my end; the script knows how to assemble
just the relevant files for a particular module.
Cheers,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
o
a sanity check, they named the internal value very similarly. By using
"_temperature" they (a) keep the name very similar and (b) make it clear that
the internal value is "private", not intended for direct use by code outside
the class.
Cheers,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
n off it goes with a FileHandler for that path for the filing actions
for that maildir.
So you're not contrained to drop log files all through your source tree (ewww!)
My opinion is that you should decide where your logfiles _should_ live; it
generally has nothing (or little) to do with the module name. I keep mine,
generally, in various subdirectories of "$HOME/var/log".
Cheers,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
a nice threaded
way.
Digests have many problems, some of which you're well aware of. I wish they
weren't even an option.
Cheers,
Cameron Simpson
--
https://mail.python.org/mailman/listinfo/python-list
such in order to improve error messages to the end user.
Or perhaps more conveniently for the end user, possibly an option supplied at
db connect time, though I'd entirely understand wanting a cursor option so that
one can pick and choose in a fine grained fashion.
Cheers,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
assA import A
from classB import B
from classC import C
conn = A(address, port)
sender = B(conn, other-stuff...)
receiver = C(conn, other-stuff...)
B.speak("foo")
and so forth.
Cheers,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
ing python-setuptools but all of these did not fix this issue.
You need to fetch the "packaging" module. That is what pip is for, eg:
pip install --user packaging
The --user is to install it in your "personal" python library space.
Cheers,
Cameron Simpson (formerly c...@zip.com.
On 29Oct2017 10:11, Cameron Simpson wrote:
It may be a bug. Or it may be a system call which cannot be meaningfulling
retried. But had you considered only activating the handler around the sleep?
You still need to copy with SIGINT single I infer that you send this from
outside the program
al at all, and therefore prevents the signal interrupting system calls.
So you activate your dummy-quit-sleeping function only around the sleep itself.
Cheers,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
reach for "sudo" by reflex. It _will_ get you into trouble
one day, either by doing unintended damage to your stuff or by raising the ire
of some sysadmin when you try it on some system that is their responsibility.
Thank you,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
tags-file -a -R /path/to/your/python/lib" not scan the
python library? Haven't tried it myself, and the tags file would be HUGE...
Hmm...
[~]fleet*> ctags -o testtags -a -R /usr/lib/python2.7
[~]fleet*> L testtags
-rw-rw-r-- 1 cameron cameron 7208525 31 Oct 10:19 t
sic idea is to make a small data structure of your own (just the
dictionary runner_lists in the example above) and fill it in with the
infomation you care about in a convenient and useful shape. Then just return
the data structure.
The actual data structure will depend on what you need to do with this later.
Cheers,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
's example:
joinpath(dirname(...), ...)
You can see I've given a distinctive name to "join", which would otherwise be
pretty vague.
Cheers,
Cameron Simpson (formerly c...@zip.com.au)"
--
https://mail.python.org/mailman/listinfo/python-list
]["RacingFormGuide"]["Event"]["Runners"]
That's the beauty of offering untested code: I don't have to find and fix my
errors:-)
Cheers,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
t;s".decode() returns the string value "s", and Python is
internally deciding to reuse the existing "s" from the left half of your
comparison. It can do this because strings are immutable. (For example, "+=" on
a string makes a new string).
Hoping this is now more clear,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
ython-list
and subscribe, and see if things seem better than the newsgroup.
Cheers,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
tive. I'm not a big believer in "egoless programming" as my ego is
bound up in my desire for quality, but a consequence of that is that criticism
_is_ received personally, and therefore it should be as well phrased as
feasible.
Before signing out, let me hark to some words from the glorious film "Harvey":
"I used to be smart. I recommend nice."
Cheers,
Cameron Simpson (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list
t at submittion time.
Here's an example failure at runtime:
pilfer.py: WorkerThreadPool:Later-1:WorkerThreadPool: worker thread: ran task: exception!
(, TypeError('() takes 0 positional arguments but 1 was
given',), )
Traceback (most recent call last):
File "
Usually I define a small class for this
kind of thing and keep all the state in class instances. That way it can scale
(keeping multiple "states" at once).
However, it does depend on your particular situation. I find situations where I
want to directly change "global" valu
On 15Nov2017 09:12, Chris Angelico wrote:
On Wed, Nov 15, 2017 at 8:05 AM, Cameron Simpson wrote:
I know that this isn't generally solvable, but I'm wondering if it is
partially solvable.
I have a task manager which accepts callables, usually functions or
generators, and calls th
mod1
Making:
mod2.mod1 --> mod1, mod1.x --> 1
Then:
mod2.py: mod1.x = 2
Making:
mod2.mod1 --> mod1, mod1.x --> 2
Because you're adjusting the reference "mod1.x", _not_ the distinct reference
"mod2.x".
Cheers,
Cameron Simpson (formerly c...@zip.com.a
ngs to straight things. Roughly 3.'
Now, I accept that the "CPython coaleases some values to shared singletons"
thing is an issue, but the language doesn't require it, and one could change
implementations such that applying a docstring to an object _removed_ it from
the m
201 - 300 of 2434 matches
Mail list logo