Pythonistas:
We are happy to remind all Django users that DjangoCon US is in DC this year,
from September 3-8 (main conference September 4-6). Early bird pricing is
available until August 3, and the schedule will be published shortly after this
announcement is made.
http://djangocon.us/
Sin
dth student would be abused and
the thousandth murdered).
So I wondered if anyone had any good ideas.
regards
Steve
--
Steve Holden
st...@holdenweb.com
--
http://mail.python.org/mailman/listinfo/python-list
Haven't had much Cc input so far, but this one is definitely worth following up
on. Thanks!
regards
Steve
On Aug 4, 2011, at 5:42 PM, Eric Snow wrote:
> On Wed, Aug 3, 2011 at 9:14 PM, Steve Holden wrote:
>> [Ccs appreciated]
>> After some three years labor I (@holdenweb)
enjoy it.
Seasons greetings
Steve
Steve Holden
On Wed, Dec 6, 2017 at 2:29 AM, Ned Deily wrote:
> Announcing the immediate availability of Python 3.6.4 release candidate 1
> and of Python 3.7.0 alpha 3!
>
> Python 3.6.4rc1 is the first release candidate for Python 3.6.4, the next
>
Terry Reedy wrote:
> "Steve Holden" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>Which is yet another reason why it makes absolutely no sense to apply
>>arithmetic operations to Boolean values.
>
>
> Except for counting the num
Mike wrote:
> "Steve Holden" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>Jim Hugunin's keynote speech at this year's PyCon was accompanied by a
>>projection if his interactive interpreter session, and I know I wasn
way to ensure that
the result is floating point is to cast it as
pct = 100.0 * v) / N
This is guaranteed to work in all past and future Python versions
without setting any options. Then you can format is using the % operator.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800
t; Received: from bag.python.org (bag [127.0.0.1])
> by bag.python.org (Postfix) with ESMTP id 8C4871E4013
> for <[EMAIL PROTECTED]>; Fri, 23 Sep 2005 01:50:10 +0200 (CEST)
> _
> ...
>
>
> Regards,
> Bengt
Steve Holden wrote:
> Sen-Lung Chen wrote:
>
>>Dear All:
>> I have a question of show percentage.
>>For example ,I want to show the percentage of 1/3 = 33.33%
>>
>> I use the 1*100/3 = 33
>>it is 33 not 33.33 , how to show the 33.33 %
>> Thanks
&g
;
I think you're looking for the wx.Notebook control.
Search for "notebook" in
http://wiki.wxpython.org/index.cgi/Getting_20Started
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006
;>Here's a faster method, though not cross-platform:
>>
>>import ctypes
>>ctypes.windll.user32.MessageBoxA(0, "Hello World", "Title", 0x00)
>
>
> Another easy way to do a dialog box:
>
> import os
> os.system('Xdialog --msgbox "Hello World
>>> 3**6
729
>>> 3**7
2187
>>>
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.pycon.org
--
http://mail.python.org/mailman/listinfo/python-list
persuade as many as possible to give it a try.
It's a couple of months since Brian Zimmer made the release, but I am
pretty sure that the developers on Jython would be grateful for more
feedback.
http://sourceforge.net/projects/jython/
regards
Steve
--
Steve Holden +44 150 684
and making the *dangerous* assumption
that each message genuinely is exactly three lines, we might write:
msglist = []
f = open("theDataFile.txt", "r")
for date in f:
who = f.next() # pulls a line from the file
msg = f.next() # pulls a line from the file
ent line.
> #
> # Whitespace formatting, after all, is VERY PYTHONIC. ;-)
> # Delimiters on the other hand -- well, we prefer not to mention
> # the sort of languages that use those, right? ;-)
>
+1
> Another possibility is to recognize lines like:
>
> #---
> #***
> #=
ly don't think there's much to complain about (except that "it
hasn't been done for *my* machine").
Even embedded systems are much larger now than the minicomputers of
yesteryear. Everything's relative. Just wait three years!
i-remember-when-we-'ad-ter-cod
support
> real private and
> protected?
> If private and protected is supported, python will be perfect.
>
You only say that because you assume private and protected give you a
security that they actually don't. They certainly make it more difficult
to *spot* the security errors.
n appears to contain
Lib/test/test_dict.py
Perhaps this might serve as a starting point.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.pycon.org
--
http://mail.python.
Paul Boddie wrote:
> Steve Holden wrote:
>
>>Even embedded systems are much larger now than the minicomputers of
>>yesteryear. Everything's relative. Just wait three years!
>
>
> Had you placed such a bet in 2000, you'd have cleaned up at the
> &qu
ter, wxPython and other graphical toolkits, because the programs
it runs are run as separate processes.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.pycon.org
--
http://mail.python.org/mailman/listinfo/python-list
line = f.readline()
if not line:
break
...do something with line...
We would nowadays write
for line in f:
...do something with line...
which seems to feel quite natural to most Python programmers.
regards
Steve
--
Steve Holden
't think of a single time that I've ever seen a legitimate use of
> name mangling to reach from one class into another in a Python
> application (I don't count something like a debugger). If you're got
> some concrete examples I wouldn't mind looking.
[pss
be done. Others will doubtless post
more specific advice, so I am trying to provide a little background in
case it should be needed.
More specific (Google) searches will also give insights into different
aspects of this problem.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 80
ing, there's nothing like that with Python.
4) Yes.
5) You should learn a new language now and then just to stay in practice
and get in touch with newer ideas. Python isn't that hard for a Java
programmer to learn, though naturally there are differences. The two
languages in combination sh
every one of his 158 lines, but his code is pure poetry, or
> possibly triple-distilled evil, depending on your point of view. 158 lines
> very well spent either way!
>
I particularly like the warranty:
> # NO WARRANTY: If you use this for anything important, you're mad!
regard
to do most things despite the output from a simpler (but
non-portable) solution
$ python -m this | grep way
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Note that word "obviou
Fredrik Lundh wrote:
> Steve Holden wrote:
>
>
>>To avoid naming conflicts, Python provides a mechanism (name mangling)
>>which pretty much guarantees that your names won't conflict with anybody
>>else's, *even if you subclass a class whose methods use t
):
File "", line 1, in ?
AttributeError: 'str' object has no attribute 'pop'
>>> x = [1, 2, 3]
>>> x.pop()
3
>>> x.pop()
2
>>> x
[1]
>>>
So if you genuinely have a string containing the values, split it onto a
list first using something like
x = x.split()
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.pycon.org
--
http://mail.python.org/mailman/listinfo/python-list
te package first
> (in which case you may need to install the pywin packages).
>
> Tim Delaney
While that's often good advice, in this particular case I believe the
OP's question was quite smart enough. It certainly got him the right
answer in quick time!
regards
rch on the web for what that acronym means. Try it... strange
> stuff. I was thinking there was some weird conspiracy to make people
> think there was this acronym that was well known but had no online
> definition.)
Reminds me of the old one about them missing the world "gull
which misses his point, however. Python easily allows you to
access the information you are saying you "must know" - for
non-extension classes it will even decompile the code if you ask it.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
choice is to use Python because you like it, or
not to use it because you don't. Enough with the picking every available
nit, please. Consent or stop complaining :-)
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC
ut the paranoid side of me thinks I may be missing something... any
> confirmation would be helpful.
>
Yes, it's an application setting, you aren't changing things for anyone
else.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC
Antoon Pardon wrote:
> Op 2005-09-29, Steve Holden schreef <[EMAIL PROTECTED]>:
>
>
>>Think about it: we have a language that has an eval() function and an
>>exec statement, and people are concerned that some service consumer
>>shouldn't be allowed to go
Paul Rubin wrote:
> Steve Holden <[EMAIL PROTECTED]> writes:
>
>>Good grief, the ultimate choice is to use Python because you like it,
>>or not to use it because you don't. Enough with the picking every
>>available nit, please. Consent or stop complaining :-)
&g
essarily so. You should find the uninstall leaves all your local
additions in place in site-packages, immediately available when a new
minor version is installed.
Until 2.5, of course, *then* you'll need to reinstall.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
Antoon Pardon wrote:
> Op 2005-09-30, Steve Holden schreef <[EMAIL PROTECTED]>:
>
>>Antoon Pardon wrote:
>>
>>>Op 2005-09-29, Bill Mill schreef <[EMAIL PROTECTED]>:
>>>
>>>
>>>>But, if your users can't figure out that they
responding off-list so's not to give this loony's threads any more
visibility. Please do not feed the troll (I am passing on a message that
was delivered to me, and I too should have known better).
FWIW I really like the slogan. Maybe you should register
"stupiderthanspam.com"
...
print >> myFile, moreStuff(things)
...
myFile.close()
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
, getting to the end
of a possibly sharp or vindictive response, to simply kill the post and
take what pleasure I can from not having shared that particular piece of
small-mindedness with the group. In the end our most valuable
contributions to groups like this can be the gift of being able to walk
away from a fight simply to keep the noise level down.
so-now-thank-me-for-not-saying-all-that-crap-ly y'rs - steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
slide over to you in a
> bar and say "I wanna be your friend". But at least it's better than
> not finding out at all where the external references are.
Oh, great, so now I have to code my classes so they know what to do when
someone starts spyi
7;s __init__, usually right at the start.
When you get deeply into Python you will learn that you even call a
function to determine the right superclass on which to call __init__.
What is "super()"?
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC
otect you can be a nusaince, especially when you've
> left your keys on the dining room table.
That would make a good Onion (www.TheOnion.com) headline: "Users
Discover Computer Security Conflicts with Desire for Convenience"
regards
Steve
--
Steve Holden +44
Erik Max Francis wrote:
> Steve Holden wrote:
>
>
>>While a snappish "go and look it up on Google" might suffice for a
>>mouthy apprentice who's just asked their thirteenth question in the last
>>half hour, it's (shall we say) a little on the brus
sswords in your script as long
as you are sure that the script isn;t going to be served up as content
like it currently is!
>
> Thanks in advance for answering these questions.
>
>
> Efrat
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
If there's no chance of putting any debug statements into the processing
script you might consider using a proxy or submitting to a local server
to ensure that you are submitting what you think.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC
at this is available as sys.executable
>
The interpreter? That's correct.
What you probably want is
import os, sys
print os.path.abspath(sys.argv[0])
this will give you the path to the Python script the interpreter is running.
regards
Steve
--
Steve Holden +44 150 684 7255
> is a testing framework for them.
>
Hmm. Presumably introspection via getattr() is way too dangerous, then?
Might as well throw the function away ...
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 20
can call server.close(), i just dont know when it was
> opened.
> thanks
>
If you provide the host name the server is connected immediately. You
can use that connection to send several emails, terminating the
connection when you call the object's quit() method.
regards
;>fruit_files = [x for x in os.listdir(fruit_dir) if (x[-3:]=='.py' and
>>x!='__init__.py')]
>>for fruit_file in fruit_files:
>> module_name = fruit_files[:-3]
>
> ^^^ This should be fruit_file, of course.
>
>
>> exec "from %s import *" % module_name
>>
Wouldn't
__import__(module_name)
be better.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
Celine & Dave wrote:
> Hi,
>
> What happens if I build Python with debug option
> (--with-pydebug)? Do I see any changes in my program
> output? What is --with-pydebug good for?
>
It's used for debugging the Python interpreter itself.
regards
Steve
--
Steve Holden
subscribing to the mailing list, you receive all
> posts to the list, not just the replies to your own post. But that's not
> a big disadvantage. On the contrary; one can easily learn something from
> them.
>
... if one has time to do anything but curse and delete them !
mail from
>>that list. Similarly, I no longer try and explain to people how long
>>lines violate RFCs and are a pain to read in well-behave mail readers,
>
[...]
Having a mailer that can vary its behaviour from one list to another is
something that's way beyond 90% of In
imply add an extra run to fix up
the "forgot to declare" problem. After that you get precisely one
runtime error per "forgot to initialize".
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
g that you can, if you want to you can call the
generator's next() method to access the next in its sequence of results:
>>> s1 = shg(3)
>>> s2 = shg(7)
>>> print [(i, s2.next()) for i in s1]
[(1, 1)]
>>> print [i for i in s2]
[3, 5]
Hope this makes things a little clearer.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
Carsten Haese wrote:
> On Mon, 2005-10-03 at 17:37, Steve Holden wrote:
>
>>Carsten Haese wrote:
>>
>>>On Mon, 2005-10-03 at 16:41, Carsten Haese wrote:
>>>
>>>
>>>>On Mon, 2005-10-03 at 15:52, Jacob Kroon wrote:
>>>>
>
Carsten Haese wrote:
> On Tue, 2005-10-04 at 08:32, Steve Holden wrote:
>
>>Carsten Haese wrote:
>>
>>>On Mon, 2005-10-03 at 17:37, Steve Holden wrote:
>>>
>>>
>>>>Carsten Haese wrote:
>>>>
>>>>
>>>>>
>
> Amir
>
You are hardly likely to improve performance by substituting a fairly
high-level application like CGI or MySQL for NFS. But later you suggest
that security is the issue rather than performance. I'm confused.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
an exception in
Python itself.
That said, exceptions are probably rather more "lightweight" than you
might imagine, so benchmarking (the profiler may not be best - have you
come across "timeit.py"?) is the best way to go.
regards
Steve
--
Steve Holden +44 150
't need regular expressions. You want
list1 = glob.glob("[Uu][Nn][Qq]*.dat")
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
avior for sockets, or
> whether
> it's a special behavior of linux.
>
It's been standard behaviour ever since the Berkeley socket interface
was defined, as far as I know.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
otherwise defined.
>
> This seems to imply that the specific method to sort the dictionaries
> is unimported (as long as it is a total ordering). So I can use whatever
> method I want as long as it is achieves this.
>
> But that is contradicted by the unittest. If you have a unittest
thout
getting any naming conflicts. In general the "from module import *" form
should only be used under specific conditions, which we needn't discuss
here now.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenwe
t actually
executable, and simply conditions the code generated during compilation
(to bytecode).
Hard to see why someone would want to use a global declaration unless
they were intending to assign to it, given the sematnics of access.
>
[...]
regards
Steve
--
Steve Holden +4
Antoon Pardon wrote:
> Op 2005-10-05, Steve Holden schreef <[EMAIL PROTECTED]>:
[...]
>
> Anyway, I have searched the source of the test for all testing
> with regards to < and after some browsing back and fore it seems
> it all boils down to the following two tests.
he default argument is (a reference to) a mutable object (such as a
list instance) then if one call to the function modifies that mutable
object, subsequent calls see the mutated instance as the default value.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC
t all this?
mysql> select * from t1;
+--+--+
| f1 | f2 |
+--+--+
| row1 | NULL |
| row2 | NULL |
| row3 | None |
+--+--+
3 rows in set (0.00 sec)
And the moral of the story is to believe someone is actually trying to
help you unless you have definite evidence
utput: ["hallo"]
>
> The point seems to be, that lst=[] creates a class attribute (correct
> name?), which is shared by all instances of A. So a.lst ist the same
> object as b.lst, despite the fact, that object a is different to object
> b.
>
Fredrik Lundh wrote:
>
does the
compiler know which objects are mutable?
This would not be a good change.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
ike "INSERT INTO ROW VALUE NULL()",
> kind of like the SQL DATE(), etc. I'm really rusty on my syntax etc
> right now btw so don't copy and paste that. :P
>
And besides that, Excel is a spreadsheet not a database :-)
regards
Steve
--
Steve Holden
rgs):
>
> print 'locals:',locals()
> locals().update(args)
> print locals()
>
> e = {'s':3,'e':4}
> fun(k=10,v=32,**e)
>
Because it depends on the current implementation and isn't guaranteeed
to work in th
is in the page source to start
>>with (which is as it ought to be). What are you using to parse the HTML?
>>
>>
You must be doing *something* wrong:
>>> link =
"/news/newsArticle.aspx?type=businessNews&storyID=2005-10-05T151245Z_01_HO548006_RTRUKOC_0_U
sh.
>
>
> Of course, those posts do keep the Google count for the famous
> four-letter-abbreviation down (-;
>
> Gerrit.
>
I'd been thinking it was about time the mucking fanual was updated.
regards
Steve
--
Steve Holden +44 150 684
g will
> accept a Null value.
> Thomas Bartkus
>
>
If you don't understand parameterized SQL queries you would do well to
refrain from offering database advice :-)
Presumably you always check whether StrToConcatenateIntoSqlStatement
contains no apostrophes before you actually constr
tion header?
>
>
> I'd lie down until I felt better.
>
>
Or alternatively put them in a 1,000-element list. Just as a matter of
interest, what on *earth* is the use case for a function with a thousand
arguments?
regards
Steve
--
Steve Holden +44 150 684 7255 +1
compile extensions for Python 2.4 on Windows,
having done that myself.
See
http://www.vrplumber.com/programming/mstoolkit/
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
ed it would need to be.
>
> def nulldecorator(f):
> return f
>
> if not __debug__:
>debugdecorator = nulldecorator
>
It would be easier to write
if not __debug__:
def debugdecorator(f):
return f
regards
Steve
--
Steve Holden
t I didn't
> observe much with regard to error/exception handling.
>
I'd suggest reading the documentation myself:
http://docs.python.org/lib/module-socket.html
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holde
necessarily run all the logic that gets run by your
command.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
ur answer tells more about you then about my suggestion.
>
Damn, I've been keeping away from this thread lest my exasperation lead
me to inappropriate behaviour.
Is there any statement that you *won't* argue about?
leaving-the-(hopefully)-last-word-to-you-ly y'rs - steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
, what can you expect from a country whose leader pronounces
"nuclear" as though it were spelled "nucular"? I suppose it's only a
matter of time before they change the spelling just like they did with
"aluminium".
tongue-in-cheek-ly y'rs - steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
> Steve Holden <[EMAIL PROTECTED]> writes:
>
>>In other words, you want Python to be strongly-typed, but sometimes
>>you want to allow a reference to be to any object whatsoever. In which
>>case you can't possibly do any sensible type-check
quot;, "the English-speaking
> world", "the original French". And you call yourself a grammarian.
>
I am presuming this post was meant to be a joke? No smileys, though, so
you force us to make up our own minds.
Or is "the green tomato" also unacceptable?
reg
be perfect but it doesn't need to be. It
> doesn't need to constrain us in any way but if it can detect some errors
> early, then it is worth it.
While this is a perfectly acceptable feature request, we should remember
that Python is developed and maintained by a
e snippet will trigger the assert. The culprit seems to
> be the __cmp__ method which sorts on a key with constant value.
Well indeed. As far as I can see your objects will all test equal. Did
you mean the __cmp__ method to return cmp(other.id, self.id)?
regards
Steve
--
Steve Holde
test
obj in excluded
is succeeding for all your objects because all instances of the OBJ
class compare equal, and so the assert is failing for the ones that
don;t actually appear in the "excluded" list.
regards
Steve
--
Steve Holden +44 150
Grant Edwards wrote:
> On 2005-10-07, Steve Holden <[EMAIL PROTECTED]> wrote:
[...]
>>Then again, what can you expect from a country whose leader
>>pronounces "nuclear" as though it were spelled "nucular"?
>
>
> Don't get me started on _that
; c = {1:'one'}
>>> a is c
False
>>> a in [b, c]
True
>>>
What would you have Python do differently in these circumstances?
> If this isn't a bug, it is at least unexpected in my eyes.
Ah, right. So it's your eyes that need fixing! :-)
> May
[EMAIL PROTECTED] wrote:
>>Steve Holden wrote:
>>Consider:
>
>
> >>> a = {1:'one'}
> >>> b = {2:'two'}
> >>> c = {1:'one'}
> >>> a is c
> False
> >>> a in [b, c]
> True
> &
Terry Hancock wrote:
> On Friday 07 October 2005 03:01 am, Steve Holden wrote:
>
>>OK, so how do you account for the execresence "That will give you a
>>savings of 20%", which usage is common in America?
>
>
> In America, anyway, "savings" is a
Terry Hancock wrote:
> On Friday 07 October 2005 03:44 pm, Steve Holden wrote:
>
>>Precisely because there *is* such a thing as a saving. If I buy a $100
>>gumball for $80 I have achieved a saving of 20%.
>
>
> Nope, that's incorrect American. ;-)
>
> Yo
houted "The Queen", to which he replied "The Queen, sir, is not a subject".
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
Steve Horsley wrote:
[...]
>
> The one that always makes me grit my teeth is "You have got to,
> don't you?". Well no, I do NOT got to, actually. Shudder!
>
Shouldn't that be "I don't have to got to"?
regards
Steve
--
Steve Holden +
fraid you would have to work rather harder to persuade me that
there is a problem, let alone that you have found the solution to it.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
> more info if necessary.
>
Unfortunately the StringIO module only creates instances inside the
process they are called: these objects have no existence to the
operating system or to other processes, and so can't be used for
inter-process communication.
regards
Steve
--
Steve Hold
tle('Hello World?')
>
> root.mainloop()
>
>
Are you sure it didn't say "_tkinter" was what it couldn't find?
On my Windows system the Tkinter.py file tries to import an extension
(compiled C) module called _tkinter (provided as _tkinter.dll) th
ltiple clients concurrently, but it's very convenient
when you are just getting started.
Later you might want to consider an asyncore-based approach, or perhaps
using the Twisted package. Both of these solutions are a little more
robust for production code.
regards
Steve
--
Steve Holden
me. The idiom usually used to avoid this gotcha is:
def __init__(self, myarr=None):
if myarr is None:
myarr = []
This ensures each call with the default myarr gets its own list.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC
. identify worst-case scenarios and then
estimate order-of-magnitude behaviour for them).
Test results with known test data are relatively easy to extrapolate
from, and if your test data are reasonably representative of live data
then so will your performance estimates.
Anyway, aren't you
g in. So, when
>>the client connects, it sends a string with a password, which is then
>>validated on the server side. The problem is obvious: anyone can get
>>the password just sniffing the network.
>>
>>How can I solve this?
>>
>>Daniel
1 - 100 of 4732 matches
Mail list logo