Steve Holden wrote:
The principle of least surprise is all very well, but "needless surprise
of newbies" is a dangerous criterion to adopt for programming language
design and following it consistently would lead to a mess like Visual
Basic, which grew by accretion until Microsoft realized it was
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2005-04-23 15:53:17 +0200:
Lad wrote:
Is anyone capable of providing Python advantages over PHP if there are
any?
The irreverant would point you to
http://www.python.org/doc/Humor.html#vowels
*I* wouldn't consider doing anything like that, though.
ch
Richard Blackwood wrote:
Robert Kern wrote:
His problem is that he doesn't respect that technical terms can have
different meanings in different fields and contexts. No authoritative
reference can solve his problem for him. He's being overly pedantic
about a field in which *he* is clearly not an
[EMAIL PROTECTED] wrote:
> Chris Mellon wrote:
>
>>Any time you want to write something in any way other than the obvious
>>way, ask yourself why? Is it more obvious *to you*, which is a good
>>reason as long as you're only writing code for yourself? Or is it just
>>to be different, or because you
Jack Diederich wrote:
> On Wed, Dec 21, 2005 at 01:36:42PM -0500, rbt wrote:
>
>>Alex Martelli wrote:
>>
>>>I don't think there was any official announcement, but it's true -- he
>>>sits about 15 meters away from me;-).
>>
>>For Americans: 15 meters is roughly 50 feet.
>
>
> Right, so that is ab
rbt wrote:
> The TV show on NBC in the USA running this week during primetime (Deal
> or No Deal). I figure there are roughly 10, maybe 15 contestants. They
> pick a briefcase that has between 1 penny and 1 million bucks and then
> play this silly game where NBC tries to buy the briefcase from
Rocco Moretti wrote:
> Damien Wyart wrote:
>
>> * Efrat Regev <[EMAIL PROTECTED]> in comp.lang.python:
>>
>>> Suppose I have some non-numerical Foo and would like to create a list
>>> of 20 Foo-s. Is there a one-step method (not a loop) of doing so?
>&
Damien Wyart wrote:
> * Efrat Regev <[EMAIL PROTECTED]> in comp.lang.python:
>
>>Suppose I have some non-numerical Foo and would like to create a list
>>of 20 Foo-s. Is there a one-step method (not a loop) of doing so?
>
>
> Maybe :
>
> [ Foo ] * 20
>
> or, more verbose,
>
> [ Foo for _ in ra
Riko Wichmann wrote:
> hi everyone,
>
> I'm googeling since some time, but can't find an answer - maybe because
> the answer is 'No!'.
>
> Can I call a function in python inline, so that the python byte compiler
> does actually call the function, but sort of inserts it where the inline
> call
Max wrote:
> Harlin Seritt wrote:
>
>> How can I take a time given in milliseconds (I am doing this for an
>> uptime script) and convert it to human-friendly time i.e. "4 days, 2
>> hours, 25 minutes, 10 seonds."? Is there a function from the time
>> module that can do this?
>>
>> Thanks,
>>
>> Ha
Roy Smith wrote:
> Steve Holden <[EMAIL PROTECTED]> wrote:
>
>>http://beta.python.org
>
> All I can say is, "Wow!". If nothing else, it will forever eliminate the
> idea that the web site doesn't look professional. It's almost *too* slick.
I agree with the "too slick" impression. The "learn w
LordLaraby wrote:
> If 'bankers rounding' is HALF_ROUND_EVEN, what is HALF_ROUND_UP? I
> confess to never having heard the terms.
There was a Slashdot article on rounding a short while back:
http://developers.slashdot.org/article.pl?sid=06/01/05/1838214
--
http://mail.python.org/mailman/listinfo
Johannes Zellner wrote:
> Hi,
>
> can I make an object read-only, so that
>
> x = new_value
>
> fails (and x keeps it's orginal value)?
Simon gave you a way of doing it when x is an attribute access (e.g.
p.x). I am unaware of a way of doing it when x is a straight global or
local. Unlike
Alex Martelli wrote:
> Terry Hancock <[EMAIL PROTECTED]> wrote:
>...
>
>>due to the Evil Conspiracy of region-coding, I couldn't
>>watch the British DVD even if I were to import it (Well,
>>yeah I could, but it would be painful, and probably illegal,
>
>
> I have a region-free DVD player her
Antoon Pardon wrote:
> Well we could have list(a) return [a], and have a list_from_iterable.
> Although I would prefer a different name.
Or reverse it - list() always takes a single iterable, and
list_from_scalars() is defined something like follows:
>>> def list_from_scalars(*args):
retu
Giovanni Bajo wrote:
> Robert Kern wrote:
>
>
>>>I can't find "?, ?, or ?" on my keyboard.
Posting code to newsgroups might get harder too. :-)
--
http://mail.python.org/mailman/listinfo/python-list
Robert Kern wrote:
> Rocco Moretti wrote:
>
> [James Stroud wrote:]
>
>>>>>I can't find "?, ?, or ?" on my keyboard.
>>
>>Posting code to newsgroups might get harder too. :-)
>
>
> His post made it through fine. Your newsreader
Terry Hancock wrote:
> One thing that I also think would be good is to open up the
> operator set for Python. Right now you can overload the
> existing operators, but you can't easily define new ones.
> And even if you do, you are very limited in what you can
> use, and understandability suffers.
Dave Benjamin wrote:
> On Thu, 26 Jan 2006, Mr.Rech wrote:
>
>> Suppose I'm writing a base class with an __eq__ special methods, using
>> isinstance() I would have wrote:
>>
>> class foo(object):
>>...
>>def __eq__(self, other):
>> return isinstance(other, type(self)) and self.an_at
Peter Maas wrote:
> - The logo does indeed resemble a cross. How about rotating it at 45 deg
> to make it look like an x? Or give it a circular shape? Please note
> that there are no religious motives in this remark :)
It looks like a plus sign to me. Do you also advocate renaming "C++" to
"
Mr.Rech wrote:
> All in all it seems that the implementation that uses isinstance() is
> better in this case...
Well what's "better" depends on what you want to happen when you compare
an unrelated class that also defines 'an_attribute'. Unlike in
statically typed languages, certain things are m
Paul Boddie wrote:
> With the nice font they've used, I don't understand why they didn't
> turn the "p" into a snake itself. I'm sure I've seen that done
> somewhere before.
You're probably thinking of PyPy:
http://codespeak.net/pypy/dist/pypy/doc/news.html
--
http://mail.python.org/mailman/lis
Ivan Voras wrote:
> It's not a far-out idea. I stumbled about a year ago on a programming
> language that INSISTED on unicode characters like ≤ as well as the rest
> of mathematical/logical symbols; I don't remember its name but the
> source code with characters like that looked absolutely beau
JerryB wrote:
> Hi,
> I have a dictionary, a string, and I'm creating another string, like
> this:
>
> dict = {}
> dict[beatles] = "need"
> str = "love"
>
> mystr = """All you %(dict[beatles])s is %(str)s""" % locals()
>
> Why do I get
> keyerror: 'dict[one]'?
>
> Is there a way to reference th
Simon Faulkner wrote:
> Pardon me if this has been done to death but I can't find a simple
> explanation.
>
> I love Python for it's ease and speed of development especially for the
> "Programming Challenged" like me but why hasn't someone written a
> compiler for Python?
>
> I guess it's not
Erik Max Francis wrote:
> If a 4-tuple is a quadruple, a 3-tuple is a triple, a
> 2-tuple is an pair, then I guess a 1-tuple would be a single. Granted
> that's not nearly as gruesome enough a name to go with the special
> lopsided Pythonic creature mentioned above. I suggest we name it a
> h
Gregory Piñero wrote:
> On 14 Feb 2006 06:44:02 -0800, [EMAIL PROTECTED]
>
>
>>5./2.=2.5 is floating point math, with all the round off errors that
>>incorporates.
>
> Thanks Curtis, I never knew that trick. I guess for variables do have
> true division you have to make them floats? e.g.
> flo
Steven D'Aprano wrote:
> Anybody using Python *should* be aware of the division issue. As soon as
> they see a division, it is their responsibility to *find out what it
> means*. That doesn't require much work: they can scroll up to the
> beginning of the module and look at the first few lines. Th
Steve Holden wrote:
> fraca7 wrote:
>
>> The memory allocation for integers is optimized. 'Small' integers
>> (between -5 and 100 IIRC) are allocated once and reused. The memory
>> for larger integers is allocated once and reused whenever possible, so
>> the malloc() overhead is negligible.
>
Max wrote:
> But today we were discussing the problem of running externally-provided
> code (e.g. add-on modules). Neither of us knew how to do it in C, though
> I suggested using DLLs. However, I quickly installed python on his
> laptop and coded this:
>
> exec "import %s as ext_mod" % raw_in
[EMAIL PROTECTED] wrote:
> Hi,
> I'm trying to open a Netcdf file using NetcdfFile but I always get an
> import error DLL failed
> even though I've tried using all these:
>
> import Numeric
> from Scientific.IO.NetCDF import NetCDFFile
> from Scientific.IO import NetCDF
> from Scientific import *
Alexander Schmolck wrote:
> I wanted to point
> out that one could with just as much justification claim CL to be more dynamic
> than python (it is in some regards, but not in others -- how to weight them to
> achieve some overall "score" is not obvious.
I think it's worth pointing out that not a
Paul Rubin wrote:
> Despite the shrieks of the "Python is not Lisp!" crowd, Python
> semantics and Lisp semantics aren't THAT different, and yet compiled
> Lisp implementations com completely beat the pants off of interpreted
> Python in terms of performance.
I know little about Lisp compilatio
Terry Hancock wrote:
> *But you do have to remember that strings are documented under "sequences"
> this is probably my biggest complaint about the Library Reference ---
> something
> as important as string methods should have its own heading in the top-level
> outline. But that's a nitpick, of
bruno modulix wrote:
>
> I fail to see why would it would be better to have to open a browser, go
> to python.org, go to the doc, find the right link etc instead of just
> typing dir(xxx) and/or help(xxx).
Well, for those with Windows machines, the documentation is a simple
Start->All Programs
Dave Brueck wrote:
> Grant Edwards wrote:
>
>>
>> Except for the torture of using a web forum's UI.
>>
>> [In case you can't tell, I hate web forums. I've never seen a
>> single one with a suable UI.]
>
>
> Amen! Generally they are an abomination.
>
> To make matters worse, many forums that be
Alex Stapleton wrote:
> The question still remains, can it run it's self? ;)
>
I think they try, every once in a while, to self host. The only problem
at this stage of the game is the ~2000x speed slowdown. Using that
figure, a five second startup time for PyPy on CPython would take about
3 ho
Simon Brunning wrote:
> QOTW: "If you're sick of answering newbie questions, and don't think you
> can do so politely, for the sake of the community, DON'T! You're not that
> necessary." - Joal Heagney
Taken out of context, Joal's comments might seem a bit rude and abrasive
- I don't think they
Dan Sommers wrote:
> On Fri, 27 May 2005 16:10:32 +0200,
> Wolfram Kraus <[EMAIL PROTECTED]> wrote:
>
>
>>Duncan Booth wrote:
>
>
>>import string
>>upone = string.maketrans(
>>>
>>>'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
>>>'bcdefghijklmnopqrstuvwxyzaBCDEFGHIJKLMNOPQRSTU
poisondart wrote:
> With the exception of the example with neighbour Bobby (which directly
> utilizes my code for profit, in which case is a definite no), I don't
> see why your other examples should make me reconsider releasing my
> software for free.
I don't think he's trying to make you recons
lostinpython wrote:
> But needless to say, I'm stumped on this
> problem. I keep ending up in a never ending loop.
I've been told that the trick with recursion/iteration is to always
determine what your ending condition is first, and then construct the
body of the recursion/loop to reach that e
Kay Schluehr wrote:
> Anton Vredegoor wrote:
>
>
>>I'm not involved in PyPy myself but this would seem a logical
>>possibility. To go a step further, if the compiler somehow would know
>>about the shortest machine code sequence which would produce the
>>desired effect then there would be no reaso
> "Dave Brueck" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>Michael wrote:
>>
>>>sorry, I'm used to working in c++ :-p
>>>
>>>if i do
>>>a=2
>>>b=a
>>>b=0
>>>then a is still 2!?
>>>
>>>so when do = mean a reference to the same object
>>
>>Always.
>>
>>
>>>and when does it mea
Skip Montanaro wrote:
> Thomas> The Python world lacks the phenomenally successful development
> Thomas> models enjoyed by the now ancient Turbo Pascal, Delphi and
> Thomas> Visual Basic.
> Thomas> AND
> Thomas> If the likes of Visual Basic can have it, then it becomes
>
Ivan Van Laningham wrote:
> Hi All--
> I've been using PySol-4.40 for years, because that was the last Windows
> installer version I could find. My wife's been using it for almost the
> same length of time. That version's worked just fine on W98, W98SE, W2K
> (server included), and WinXP SP1.
>
Adam Munoz Lopez wrote:
> Can anyone help with this code... I have infinite
> recursion but since I'm pretty new to Python (and
> programming in general) I can't find where I did the
> mistake.
It really does help to start removing things trying to get the minimal
code which causes the problem.
Jordan Rastrick wrote:
> Unless someone can explain some sort of problem that arises from having
> != take advantage of a __eq__ method where present, I'd suggest that it
> should do so in Python 2.5.
If you're serious about this proposal, please formalize it in a PEP.
Things to specify:
How ex
Matt Warden wrote:
> Jordan,
>
> On 8 Jun 2005 11:44:43 -0700, Jordan Rastrick
> <[EMAIL PROTECTED]> wrote:
>
>>But I explicitly provided a method to test equality. And look at the
>>plain english meaning of the term "Not equals" I think its pretty
>>reasonable
>
>
> Indeed. Furthermore, it see
Dan Sommers wrote:
> On Thu, 09 Jun 2005 15:50:42 +1200,
> Greg Ewing <[EMAIL PROTECTED]> wrote:
>
>
>>Rocco Moretti wrote:
>>
>>>The main problem is that Python is trying to stick at least three
>>>different concepts onto the same set of operators
George Sakkis wrote:
> "Rocco Moretti" wrote:
>
>
>>One way to handle that is to refuse to sort anything that doesn't have a
>>"natural" order. But as I understand it, Guido decided that being able
>>to sort arbitrary lists is a feature, n
Before I answer, let me clarify my position. I am NOT advocating any
change for the 2.x series. I'm not even forwarding any particular
proposal for 3.0/3000. My key (and close to sole) point is that behavior
of > & < is conceptually distinct from ordering in a sorted list, even
though the beha
101 - 151 of 151 matches
Mail list logo