Hrvoje Niksic wrote:
> "Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> writes:
>
>> Yep - appears I must have been misremembering from another language
>> (dunno which)
>
> Tcl
Not bloody likely - only used Tcl for expect, and then only very
minimally
TheFlyingDutchman wrote:
> On Sep 28, 1:09 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>
>> That's because the tutor list doesn't offer a newsgroup. He was
>> probably just trying to get rid of you.
>>
>> Now at 98.75% ...
>
> Not sure if that's the reading on your trollmeter or on the meter th
[EMAIL PROTECTED] wrote:
> ANNOUNCE:
> NUCULAR fielded text searchable indexing
Does "NUCULAR" stand for anything? The (apparent) misspelling of
"nuclear" has already turned me off wanting to find out more about it.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
>> From: Grant Edwards
>>
>> Anyway, I apologize for my attempt at humor, since it appears
>> to have somehow offended.
>
> Why apologize? If someone doesn't like the name given to a piece of
> software by its author(s), screw them. If I find the software useful,
> I'l
Licheng Fang wrote:
> This is enlightening. Surely I shouldn't have worried too much about
> performance before doing some measurement.
And with that statement you have truly achieved enlightenment.
Or to put it another way ... performance tuning without profiling is a
waste of time.
Tim Delane
Colin J. Williams wrote:
> Yes, I agree. The ternary operator is a step forward.
That's still debateable ;)
Pro: It puts paid to the "python doesn't have a ternary operator" and
and/or abuse.
Con: It shouldn't ever be used.
Cheers,
Tim Delaney
--
http://mail.python.org/mailman/listinfo/pyth
John Machin wrote:
agent-s wrote:
>> btw Steven you are so witty I hope to one day pwn noobs on newsgroups
>> too.
>
> Wit has nothing to do with it. The fact that you are a Python noob is
> also irrelevant. Your problem statement was unintelligible, as is your
> response. What does "pwn" mean?
Steven D'Aprano wrote:
> This is an example of overloading:
>
> class Cheese(object):
> def flavour(self):
> return "tasty and scrumptious"
> def colour(self):
> return "yellow"
>
> Now we define a sub-class which overloads some methods:
>
> class BlueVein(Cheese):
>
Nick Craig-Wood wrote:
> x += a
>
> does not equal
>
> x = x + a
>
> which it really should for all types of x and a
Actually, this will *never* be the case for classes that do in-place
augmented assignment.
a = [1]
b = [2]
c = a + b
print a, b, c
a += b
prin
Nick Craig-Wood wrote:
> Which appears to support my point, x (and a for that matter) are the
> same for both methods wheter you do x = x + a or x += a.
>
> The mechanism is different certainly, but the result should be the
> same otherwise you are breaking the basic rules of arithmetic the
> prog
[EMAIL PROTECTED] wrote:
> I don't know to which forum should I post the message
> I hope someone related to the Python kernel development will read &
> consider the idea
It has been considered and rejected.
http://www.python.org/doc/faq/general/#why-are-colons-required-for-the-i
f-while-def-cla
John Nagle wrote:
> "weakref.proxy()" probably should work that way.
> Weakref proxies are supposed to be transparent, but they're not
> quite transparent enough.
Submit a patch to SourceForge. Please don't use tabs in email/usenet
postings - use 4-space indents. "return" is not a function, a
Daniel Nogradi wrote:
>>> Something funny:
>>>
>>> The new programming model of NVIDIA GPU's is called CUDA and I've
>>> noticed that they use the same __special__ notation for certain
>>> things as does python. For instance their modified C language has
>>> identifiers such as __device__, __glob
[EMAIL PROTECTED] wrote:
> All,
> It works great now. Thank you for all of your incredibly quick
> replies.
> Rob
You should have a read of these:
http://wiki.python.org/moin/BeginnersGuide
http://effbot.org/zone/python-objects.htm
Cheers,
Tim Delaney
--
http://mail.python.org/mailman/listin
Alan Franzoni wrote:
>> self.scriptcount = self.scriptcount + 1 => self.scriptcount += 1
>
> the += operator is syntactic sugar just to save time... if one
> doesn't use it I don't think it's a matter of beauty.
This change can have semantic differences, and so should not be done for
anything ex
Alan Franzoni wrote:
> Yeah, that's right, it could have semantic differences, but that
> shouldn't be the case anyway. I mean, if I don't define an __iadd__
> method, writing
>
> a += n
>
> or
>
> a = a + n
>
> is just the same, right?
>
> So, if I bother to define an __iadd__ method, I sho
Aahz wrote:
>> Unless it's a new style class with __slots__
>
> []
>
> Naw, I'll skip the rant this time. ;-)
Wuss! I was looking forward to it :)
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Aahz wrote:
> In article <[EMAIL PROTECTED]>,
> Chris Mellon <[EMAIL PROTECTED]> wrote:
>>
>> You can reduce the size of new-style classes (inherit from object) by
>> quite a bit if you use __slots__ to eliminate the class dictionary.
>
> You can also reduce your functionality quite a bit by usi
Aahz wrote:
>> Indeed, I think the inclusion of ctypes is far and away the most
>> exciting thing in 2.5.
>
> Really? More than pysqlite?
My personal fave is the "with" statement. It makes a lot of code so much
more elegant - esp. for things which are getting built-in context
managers (e.g. fil
vj wrote:
> Are there any plans to release pylint under the LGPL license?
Why would it matter? PyLint is a tool you run *on* your source - you
don't distribute PyLint to your users.
And even if you did - your Python code doesn't link to PyLint, so
there's no need to GPL your code.
Tim Delaney
-
Grant Edwards wrote:
> On 2006-05-04, klauts <[EMAIL PROTECTED]> wrote:
>
>> anyone have any help on this subjecT?
>
> I use tcpdump or ethereal for packet finding.
>
> For clicking, I use a logitech optical wheel mouse for desktops
> or the integrated touchpoint/touchpad on my IBM ThinkPad.
O
[EMAIL PROTECTED] wrote:
> It seems to me that Open Source generally would be more pervasive if
> there was more transparency with respect to the practices observed
> within the projects.
You mean something like: http://www.python.org/dev/
Tim Delaney
--
http://mail.python.org/mailman/listinfo/
[EMAIL PROTECTED] wrote:
> I am a bit surprised that nobody else has tried running the short
> Python program above on a hyper-threading or dual core / dual
> processor system.
Does it happen every time? Have you tried it on multiple machines? Is it
possible that that one machine is having proble
[EMAIL PROTECTED] wrote:
> Thanks for trying and reporting the results. Both of you and Tim and
> Dave have run the .py program now (all on hyper-threaded CPUs) and
> none of you were able to reproduce the problem.
>
> So that indicates that there is something special about our PC. We
> are pla
George Sakkis wrote:
> Paul Rubin wrote:
>
>> [EMAIL PROTECTED] (Cameron Laird) writes:
>>> For that matter, would it be an advantage for len() to operate
>>> on iterables?
>>
>>print len(itertools.count())
>>
>> Ouch!!
>
> How is this worse than list(itertools.count()) ?
list(itertools.c
Delaney, Timothy (Tim) wrote:
> Actually len(itertools.count()) would as well - when a couple of long
> instances used up everything available - but it would take a *lot*
> longer.
Actually, this would depend on whether len(iterable) used a C integral
variable to accumulate the leng
Paul Rubin wrote:
> That's only because itertools.count itself uses a C int instead of a
> long.
True. In either case, the effect is the same in terms of whether
len(itertools.count()) will ever terminate.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
George Sakkis wrote:
> Delaney, Timothy (Tim) wrote:
>>
>> list(itertools.count()) will eventually fail with a MemoryError.
>
> That's more of a theoretical argument on why the latter is worse. How
> many real-world programs are prepared for MemoryError every time
Cameron Laird wrote:
> Gulp. OK, you've got me curious: how many people habitually frame
> their unit tests with resource constraints? I think I take testing
> seriously, and certainly also am involved with resource limits often,
> but I confess I've never aimed to write all my tests in terms o
Heiko Wundram wrote:
> Am Mittwoch 24 Mai 2006 06:12 schrieb Tim Roberts:
>> At one time, it was said that the "%" operator was the fastest way to
>> concatenate strings, because it was implemented in C, whereas the +
>> operator was interpreted. However, as I recall, the difference was
>> hardly
You know you've been working at a large company for too long when you
see that subject and think "ISO-certified Python?"
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> Postfix, I think, interpets "foo+bar" the same as "foo".
Gmail does the same. It's quite useful - apart from using it to
determine which site I signed up to has sent me mail, I also use it so I
can have multiple Guild Wars accounts using the same email account e.g.
[EMAI
Grant Edwards wrote:
> On 2008-01-16, Lutz Horn <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> On Wed, 16 Jan 2008 05:29:08 -0800 (PST), [EMAIL PROTECTED]
>> said:
>>> var = "/home/anonymous"
>>> os.system("echo $var)
>>
>> os.system("echo %s" % var)
>
> Though one wonders why one wou
Aahz wrote:
> For anyone who hasn't heard, E. Gary Gygax died yesterday. Some
> people think we should build a tomb in his honor. ;-)
Well, you sure wouldn't get a saving throw there ;)
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> On Mar 23, 12:32 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> John Machin schrieb:
>>
>>> On Mar 21, 11:48 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>>
[1] Just one example:http://docs.mootools.net/Class/Class.js
>>
>>> Mootools being something a cowork
Steven D'Aprano wrote:
> On Sat, 22 Mar 2008 21:11:51 -0700, sturlamolden wrote:
>
>> Yes. And because Python is a "scripting language"
>
>
> Python is a programming language. It can be used for scripting, but
> that's not all it can do. Describing it as a "scripting language" is
> like describ
Terry Reedy wrote:
>> The compiled code differs.
>
> I *strongly* doubt that. Properties are designed to be transparent to
> user code that access atrributes through the usual dotted name
> notation precisely so that class code can be changed from
>x = ob
> to
>x = property(get_x, set_x,
[email protected] wrote:
> We've been running SpamBayes on the news-to-mail gateway on
> mail.python.org for a couple weeks now. To me it seems like the
> level of spam leaking onto the list has dropped way down but I'd like
> some feedback from people who read the [email protected] mailing
> l
[email protected] wrote:
> I have missed another example: It may be possible to create a sorting
> routine that's not stable but is faster than the current stable
> timsort (for example in C++ STL you have both sorting routines, and
> the unstable one is a variant of introsort that is faste
[email protected] wrote:
> Paul Rubin:
>> Gideon Smeding of the University of
>> Utrecht has written a masters' thesis titled "An executable
>> operational semantics for Python".
>
> A significant part of Computer Science is a waste of time and money.
The same can be said for any research
Piotr Sobolewski wrote:
> Hello,
> I have such program:
>
> import time
> import thread
> def f():
> global lock
> while True:
> lock.acquire()
> print thread.get_ident()
> time.sleep(1)
> lock.release()
> lock=thread.allocate_lock()
> thread.start_new_thre
Paulo J. Matos wrote:
> Question cleared:
> http://wiki.python.org/moin/DistributionUtilities
Another option that we've used in the past was to write the "sensitive"
bits in Pyrex/Cython. These get compiled to executable code (a .pyd/DLL
on Windows, .so on Unix-like systems). They are tied to the
Tim Chase wrote:
> # swap list contents...not so much...
> >>> m,n = [1,2,3],[4,5,6]
> >>> m[:],n[:] = n,m
> >>> m,n
> ([4, 5, 6], [4, 5, 6])
>
>
> The first two work as expected but the 3rd seems to leak some
> internal abstraction. It seems to work if I force content-copying:
>
> >>> m[:
>
> If that's the problem, the solution is: get more memory.
>
Or maybe think about algorithm, which needs less memory... My
experience tells me, that each time when you want to store a lot of
data into dict (or other structure) to analyze it then, you can find a
way not to store so much amount of
ZikO wrote:
> I am a C++ programmer and I am thinking of learning something else
> because I know second language might be very helpful somehow. I have
> heard a few positive things about Python but I have never writen any
> single line in python so I do not know this language at all.
>
> Do you t
Aahz wrote:
> In article <[email protected]>,
> Bruno Desthuilliers wrote:
>> Tomasz Rola a écrit :
>>>
>>> I may not be objective (tried Java, hated it after 6 years).
>>
>> Arf - only took me 6 months !-)
>
> That long? It only took me six minutes.
I was young and fool
Rhodri James wrote:
> On Thu, 26 Mar 2009 09:35:55 -, Paddy O'Loughlin
> wrote:
>
>> Because of this, I was thinking of making sure I included exceptions
>> and handling, the richness of the python library and a pointing out
>> how many modules there were out there to do almost anything one
As someone who has to use ClearCase UCM at work (damned politics!) I can
tell you that I very much prefer creating a separate view (directory)
for each branch as I used to do in Base ClearCase.
All too often you end up having to deliver multiple activities together
because someone else made a cha
Sorry - it's early and I didn't force Outlook to not top-post.
Unfortunately, I get asked to top-post here at work ...
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Lawrence D'Oliveiro wrote:
> In message ,
> Terry Reedy wrote:
>
>> Lawrence D'Oliveiro wrote:
>>
>>> All Python objects are reference-counted.
>>
>> Nope. Only in CPython, and even that could change.
>
> Why should it?
Because Guido has said it might some time in the future.
>>> Once the f
Mensanator wrote:
> Ok, I agree with 101, but I wouldn't necessarily
> say the others were unfortunate. You might be
> surprised at how often such fixations discover
> bugs, something that I have a gift for.
The discovering, the making, or both? ;)
Tim Delaney
--
http://mail.python.org/mailman/l
Ian Kelly wrote:
> It sounds like the wasteful list creation is the biggest objection to
> using a list comprehension. I'm curious what people think of this
> alternative, which avoids populating the list by using a generator
> expression instead (apart from the fact that this is still quadratic,
Christian Heimes wrote:
> Can you provide a C implementation that compiles under VS 2008? Python
> 2.6 and 3.0 are using my new VS 2008 build system and we have dropped
> support for 9x, ME and NT4. If you can provide us with an
> implementation we *might* consider using it.
You'd have to at leas
Maric Michaud wrote:
> Le Friday 27 June 2008 18:26:45 Christian Heimes, vous avez écrit :
>> Ask yourself if you are interested if f.tell() returns exactly the
>> same 0 object ("is") or a number that is equal to 0 ("==").
>
> That said, "f.tell() == 0" and "f.tell() != 0" should be written
> "f
ssecorp wrote:
> so why would you ever want mutability?
>
>
> seems very counterintuitive and unreliable.
Because immutability imposes a lot of restrictions and performance
characteristics that mutable objects don't have. For example, compare
building up a list and a tuple element-by-element (u
Fredrik Lundh wrote:
> rynt wrote:
>
>> You're either ---
>> A. A Troll
>> B. A young, immature programmer trying to show off or
>> C. A total idiot.
>
> you forgot the "All of the above" choice.
I read it as an inclusive "or".
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-l
Guillermo wrote:
> Hi there,
>
> Is it possible to get a 2.4 dll of python for Windows easily? I need
> it to use python as scripting language for Vim.
http://www.python.org/
which leads you to:
http://www.python.org/download/
which leads you to:
http://www.python.org/download/releases/2.4.5/
Diez B. Roggisch wrote:
>> For sets, I presume they are built on top of or like dicts, and
>> there is nothing crazy in the low level implementation so that I can
>> be guaranteed that if I don't alter the set, then the order,
>> although arbitrary, will be maintained in successive iterations over
David C. Ullrich wrote:
> f: 0.0158488750458
> g: 0.000610113143921
> h: 0.00200295448303
> f: 0.0184948444366
> g: 0.000257015228271
> h: 0.00116610527039
I suspect you're hitting the point of diminishing returns with g, and
any further investigations into optimisation are purely for fun and
lea
George Sakkis wrote:
> On Mar 31, 1:46 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
>>> More specifically, who can create a bigger mess on c.l.py? (check
>>> one)
>>
>>> [ ] - Xah Lee
>>> [X] - castironpi
>>
>> Xah Lee's postings might be trolls but sometimes they spark some
>> re
Lie wrote:
> Ah... now I understand what the Zen is talking about when it said:
> "Now is better then never, although never is often better than *right*
> now." If you don't have all the necessary resources to fix an
> exception right now, don't try to fix it, instead let it propagate,
> and allow
Steven D'Aprano wrote:
> On Thu, 04 Sep 2008 01:22:22 +0100, Alexander Schmolck wrote:
>
>> It seems to me that the right choice for thousands seperator is the
>> apostrophe.
>
> You mean the character already used as a string delimiter?
Hey - I just found a new use for the backtick!
123`456`7
[EMAIL PROTECTED] wrote:
> You can look at this, its API looks very well thought out to me:
> http://oakwinter.com/code/typecheck/
>
>> Now, on the other hand, if we were to introduce a purely optional
>> type hint to the function prototype, such as follows:
>> def multiplyByTwo(value:int): retur
Rich wrote:
> I'm more thinking about Python, PHP, C++, Perl, Euphoria, which are
> languages I'm thinking of learning now. They look much more like each
> other than basic and MC, at places some even share the exact same
> syntax it seems, so your brain might get confused with what language
> you
Max M wrote:
> decorated = [(obj.x, obj) for obj in objects]
> max_decorated = max(decorated)
> max_obj = max_decorated[-1]
Python 2.5 will make this even easier - max() and min() aquire a `key`
keyword parameter much like list.sort()/sorted().
max_obj = max(objects, key=operator.attrgetter(
Steven D'Aprano wrote:
> The classic example of the "look before you leap" and
> "just do it" idioms involves looking up a key in a
> dictionary:
>
> # method one
> if some_dict.has_key(key):
> do_something_with(some_dict[key])
> else:
> do_something_else()
FWIW, in recent Python versi
Diez B. Roggisch wrote:
>> Oh well, just wait until Python 2.5 comes out and we get people
>> complaining about the order of the new if statement.
>
> Sad, but true. But I'm a happy camper with list-comps and the new
> if-expression :)
Personally, I'm hoping the unusual order of the if-expressio
Fredrik Lundh wrote:
> (and there was never 96 real errors in the code base, of course;
> coverity is a remarkable tool, but there's plenty of room for
> mistakes when used on a code base this large)
Yep - from the discussions on python-dev, a lot of the "error-fixing"
was telling Coverity what t
Recently I purchased some software to recover some files which I had
lost. (A python project, incidentally! Yes, I should have kept better
backups!) They were nowhere to found in the file system, nor in the
recycle bin, but this software was able to locate them and restore them.
I was just wond
On Jan 28, 2:29 am, Jonathan Gardner
wrote:
> On Jan 27, 5:47 am, Simon Brunning wrote:
>
>
>
> > I think Python is a little cleaner, but I'm sure you'd find Ruby fans
> > who'd argue the complete opposite.
>
> Are you sure about that?
>
> There's a lot of line noise in Ruby. How are you supposed
Anyone know of an 'active' Python User Group near Cheltenham, UK? I
spotted one in Birmingham (http://www.pywm.eu), but would like one a
little closer ... :-)
Tim
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 16, 10:41 pm, Andrej Mitrovic
wrote:
> On Feb 16, 7:38 pm, Casey Hawthorne
> wrote:
>
> > Interesting talk on Python vs. Ruby and how he would like Python to
> > have just a bit more syntactic flexibility.
>
> >http://blog.extracheese.org/2010/02/python-vs-ruby-a-battle-to-the-de...
> > --
> Gabriel Genellina wrote:
>> Alan Harris-Reid escribió:
>>
>>> Using Python 3.1, I sometimes use the super() function to call the
>>> equivalent method from a parent class, for example
>>>
>>> def mymethod(self):
>>> super().mymethod()
>>> some more code...
>>>
>>> Is there any way of wr
Gabriel Genellina write:
> En Sun, 28 Mar 2010 21:58:07 -0300, Delaney, Timothy (Tim)
> escribió:
>>> Gabriel Genellina wrote:
>>>> Alan Harris-Reid escribió:
>>>>
>>>>> Using Python 3.1, I sometimes use the super() function to call the
&g
Hello Folks,
In a python application that I'm developing I've been asked to add
security to databases that the program might create and access; the
database is to be password protected by its creator. The application
uses an SQLite database, which could be changed for another back-end if
that
From: Ben Finney
> This thread is already off-topic and too long. I'm conflicted about my
role in that;
> I have endeavoured only to address falsehoods that IMO were not
otherwise being addressed.
>
> So I'll try to keep this brief.
>
> Ethan Furman writes:
>
>> This doesn't make sense to me, but
I am using the following code to hide the console window when launching
a subprocess under Windows.
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = subprocess.SW_HIDE
self.mplayer = Popen(args,
Mark Dickinson wrote:
>> Since the 'and' and 'or' already return objects (and objects
>> evaluate to true or false), then 'xor' should behave likewise, IMO.
>> I expect that would be the case if it were ever added to the
>> language.
>
> I'm not so sure. Did you ever wonder why the any() and al
On Aug 29, 4:26 am, qwe rty wrote:
> On Aug 29, 3:14 am, Tim Chase wrote:
>
>
>
>
>
> > >> what else can NOT be done in python? what are the limitations of the
> > >> language?
>
> > > I understand there's a little trouble getting Python to prove
> > > that P=NP You'll also find that it only com
I have successfully built a windows installer for my python program
using distutils, (python setup.py bdist_wininst), but is there a way to
do it that will allow a user ('user' == 'boss', in this case!) to
designate the installation directory, rather than being forced to
install into /Python/Li
Mark Hammond wrote:
On
9/09/2009 1:57 AM, Timothy W. Grove wrote:
I have successfully built a windows installer for my python program
using distutils, (python setup.py bdist_wininst), but is there a way to
do it that will allow a user ('user' == 'boss', in this cas
Hi,
Could I please ask for help installing Python on Windows 10 - I've tried twice
(Version 3.7 for windows) selecting the install now option. After first attempt
I uninstalled and tried again.
Each time it has put 4 items in the programs list from the windows start
button, all under headi
401 - 482 of 482 matches
Mail list logo