Mike Kazantsev wrote:
> On Wed, 17 Jun 2009 03:42:02 GMT
> Lie Ryan wrote:
>
>> Mike Kazantsev wrote:
>>> In fact, on modern filesystems it doesn't matter whether you
>>> accessing /path/f9e95ea4926a4 with million files in /path
>>> or /path/f/
Ben Finney wrote:
> You started out asking how to *interpret* it, which is fine for this
> forum; but discussing it here isn't going to lead automatically to any
> *midification* to a document developed within the core of Python.
>
I definitely want to see how python doc be midified, last time I
Lawrence D'Oliveiro wrote:
> In message <%[email protected]>, Lie Ryan
> wrote:
>
>> Yeah, it might be possible to just mv the file from outside, but not
>> being able to enter a directory just because you've got too many files
&
Amita Ekbote wrote:
> Hello,
>
> I am retrieving values from a database in the form of a dictionary so
> I can access the values as d['column'] and I was wondering if there is
> a way to convert the hash to a struct like format so i can just say
> d.column. Makes it easier to read and understand.
Amita Ekbote wrote:
> Hello,
>
> I am retrieving values from a database in the form of a dictionary so
> I can access the values as d['column'] and I was wondering if there is
> a way to convert the hash to a struct like format so i can just say
> d.column. Makes it easier to read and understand.
Sparky wrote:
>
> Thank you for your quick response, I will take a look at the link you
> provided.
Depending on what you're trying to do, you may be able to use
`synclient` with subprocess.
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
> On 2009-06-19, Mitko Haralanov wrote:
>
>> I have a question about finding out whether a string contains
>> binary data?
>
> All strings contain binary data.
Not quite, (python 2.x's) strings are binary data.
It just happens that it behaves like text when you appropria
Jure Erznožnik wrote:
> On Jun 20, 1:36 am, [email protected] (Aahz) wrote:
>> You should put up or shut up -- I've certainly seen multi-core speedup
>> with threaded software, so show us your benchmarks!
>> --
>
> Sorry, no intent to offend anyone here. Flame wars are not my thing.
>
> I have
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jean-Paul Calderone wrote:
> On Sat, 20 Jun 2009 00:07:27 GMT, Lie Ryan wrote:
>> [snip]
>>
>> Perhaps we should have more built-in/stdlib operations that can release
>> GIL safely to release GIL by default? And perhaps so
Dennis Lee Bieber wrote:
> On Fri, 19 Jun 2009 17:52:05 -0700 (PDT), Terminator
> declaimed the following in
> gmane.comp.python.general:
>
>> Hello,
>> My requierment is to get the "Stick Tag" value from the below o/p and
>> based on tag take different actions. What is the best way to implement
Luis P. Mendes wrote:
> Hi,
>
> I have a program that uses a lot of resources: memory and cpu but it
> never returned this error before with other loads:
>
> """
> MemoryError
> c/vcompiler.h:745: Fatal Python error: psyco cannot recover from the
> error above
> Aborted
> """
> The last time I
Lorenzo Di Gregorio wrote:
> I had also thought of using "None" (or whatever else) as a marker but
> I was curious to find out whether there are better ways to supply an
> object with standard values as a default argument.
> In this sense, I was looking for problems ;-)
>
> Of course the observati
Luis P. Mendes wrote:
> Sun, 21 Jun 2009 13:04:59 +0000, Lie Ryan escreveu:
>> Have you tried running without psyco? Psyco increases memory usage quite
>> significantly.
>>
>> If it runs well without psyco, you can try looking at your code and
>> selectively psyc
Ben Charrow wrote:
> I have a question about the "Using Backslash to Continue Statements" in
> the howto "Idioms and Anti-Idioms in Python"
> (http://docs.python.org/howto/doanddont.html#using-backslash-to-continue-statements)
>
>
> It says:
>
> "...if the code was:
>
> value = foo.bar()['first
Jean-Michel Pichavant wrote:
> Maybe I've been a little bit too dictatorial when I was saying that
> renaming namespaces should be avoided.
> Sure your way of doing make sense. In fact they're 2 main purposes of
> having strong coding rules:
> 1/ ease the coder's life
> 2/ ease the reader's life
BJörn Lindqvist wrote:
> 2009/6/22 :
>> Hello,
>>
>> I have thousends of files with logs from monitoring system. Each file
>> has some important data (numbers). I'd like to create charts using those
>> numbers. Could you please suggest library which will allow creating
>> such charts ? The preferr
Mark Dickinson wrote:
> On Jun 23, 3:52 am, Steven D'Aprano
> wrote:
>> On Mon, 22 Jun 2009 13:43:19 -0500, David C. Ullrich wrote:
>>> In my universe the standard definition of "log" is different froim what
>>> log means in a calculus class
>> Now I'm curious what the difference is.
>
> It's jus
Peter Billam wrote:
> On 2009-06-22, Lie Ryan wrote:
>> Ben Charrow wrote:
>>> value = foo.bar()['first'][0]*baz.quux(1, 2)[5:9] \
>>> + calculate_number(10, 20)*forbulate(500, 360)
>>> What is subtly wrong about this piece of code? I ca
Jean-Michel Pichavant wrote:
> Lie Ryan wrote:
>> Jean-Michel Pichavant wrote:
>>
>>
>>
>>
>>> Maybe I've been a little bit too dictatorial when I was saying that
>>> renaming namespaces should be avoided.
>>> Sure your way o
duncan smith wrote:
> I've just upgraded to Jaunty Jackalope where Python 2.6 is the default
> Python version. I'm still developing under 2.5, but IDLE now refuses to
> respond to left click events (for code editing, menus etc. respond as
> expected). If I right click, then left click I can move
Lawrence D'Oliveiro wrote:
> In message , Steven
> D'Aprano wrote:
>
>> On Tue, 23 Jun 2009 10:29:21 -0400, Mel wrote:
>>
>>> Steven D'Aprano wrote:
>>>
Lawrence D'Oliveiro wrote:
>> Ok, now pipe ls to less, take three days to browse through all the
>> filenames to locate the fi
ZeLegolas wrote:
> On Mon, 22 Jun 2009 19:23:59 +0200, Andre Engels
> wrote:
>> On Mon, Jun 22, 2009 at 6:58 PM, zelegolas wrote:
>>> Let me know if it's the right place to ask.
>>>
>>> I'm looking for wiki writen with python where I can import all
>>> wikipedia site.
>>> If you have any links ple
Mag Gam wrote:
> Sorry for the delayed response. I was trying to figure this problem
> out. The OS is Linux, BTW
Maybe I'm just being pedantic, but saying your OS is Linux means little
as there are hundreds of variants (distros) of Linux. (Not to mention
that Linux is a kernel, not a full blown OS
MRAB wrote:
> There's no difference between the two types of quote character.
a small exception is single-quote can contain double quote but cannot
contain unescaped single quote while double-quote can contain single
quote but cannot contain unescaped double quote.
--
http://mail.python.org/mai
Jeffrey Barish wrote:
> I have a program that uses multithreading to monitor two loops. When
> something happens in loop1, it sends a message to loop2 to have it execute
> a command. loop2 might have to return a result. If it does, it puts the
> result in a queue. loop1, meanwhile, would have b
João Valverde wrote:
> alex23 wrote:
>> João Valverde wrote:
>>
>>> Currently I don't have a strong need for this.
>>>
>>
>> And clearly neither has anyone else, hence the absence from the
>> stdlib. As others have pointed out, there are alternative approaches,
>> and plenty of recipes on A
Eric S. Johansson wrote:
> Steven D'Aprano wrote:
>> That assumes that every word is all caps. In practice, for real-life
>> Python code, I've tripled the vocal load of perhaps one percent of your
>> utterances, which cuts your productivity by 2%.
>>
>> If you have 1 words in you per day, and
Eric S. Johansson wrote:
> I've been working with speech recognition for 15 years. I've written something
> on the order of 10,000 lines of Python code both as open source and private
> projects. I've tried it least two dozen editors and they all fail miserably
> because they're focused on keyboar
Thomas Guettler wrote:
> Hi,
>
> I have bug in my code, which results in the same error has this one:
>
> https://bugs.launchpad.net/bzr/+bug/295653
> {{{
> Traceback (most recent call last):
> File "/usr/lib/python2.6/logging/__init__.py", line 765, in emit
> self.stream.write(fs % msg.enc
Thomas Guettler wrote:
> My quick fix is this:
>
> class MyFormatter(logging.Formatter):
> def format(self, record):
> msg=logging.Formatter.format(self, record)
> if isinstance(msg, str):
> msg=msg.decode('utf8', 'replace')
> return msg
>
> But I still thi
Carl Banks wrote:
> On Jun 30, 6:23 pm, Carl Banks wrote:
>> On Jun 30, 5:34 pm, Mitchell L Model wrote:
>>
>>> Allow me to add to my previous question that certainly the superclass
>>> methods can be called explicitly without resorting to super(), e.g.:
>>> class C(A, B):
>>> def __i
Joachim Strömbergson wrote:
> Aloha!
>
> Tarek Ziadé wrote:
>> The prefix is a good idea but since it's just a checksum to control
>> that the file hasn't changed
>> what's wrong with using a weak hash algorithm like md5 or now sha1 ?
>
> Because it creates a dependency to an old algorithm that s
Tim Harig wrote:
>> Speaking only to the style issue, when I've wanted to do something like
>> that, I find:
>>if self.higher is None is self.lower:
>> more readable, by making clear they are both being compared to a
>> constant, rather than compared to each other.
>
> By comparing them to
Simon Forman wrote:
> On Jul 2, 3:57 pm, Scott David Daniels wrote:
>> Duncan Booth wrote:
>>> Simon Forman wrote:
...
if self.higher is self.lower is None: return
...
>>> As a matter of style however I wouldn't use the shorthand to run two 'is'
>>> comparisons together, I'd write
Paul Rubin wrote:
> Generally, having a special
> value like None to denote a missing datum was considered standard
> practice a few decades ago,
I guess in python, None as the missing datum idiom is still quite prevalent:
def cat_list(a=None, b=None):
# poor man's list concatenation
if
Lie Ryan wrote:
> Tim Harig wrote:
>>> Speaking only to the style issue, when I've wanted to do something like
>>> that, I find:
>>>if self.higher is None is self.lower:
>>> more readable, by making clear they are both being compared to a
>
Paul Rubin wrote:
> Tim Harig writes:
>> That being the case, it might be a good idea either to handle the situation
>> and raise an exception or add:
>>
>> assert self.lower <= self.higher
>>
>> That way an exception will be raised if there is an error somewhere else
>> in the code rather then si
Simon Forman wrote:
> Hey I was hoping to get your opinions on a sort of minor stylistic
> point.
> These two snippets of code are functionally identical. Which would you
> use and why?
If self is an object (and it must have been), it would be preferrable to
set self.higher and self.lower to a kno
Brad wrote:
> On Jul 2, 9:40 pm, "Pablo Torres N." wrote:
>> If it is speed that we are after, it's my understanding that map and
>> filter are faster than iterating with the for statement (and also
>> faster than list comprehensions). So here is a rewrite:
>>
>> def split(seq, func=bool):
>>
Thomas Guettler wrote:
> Stefan Behnel schrieb:
>> Thomas Guettler wrote:
>>> My quick fix is this:
>>>
>>> class MyFormatter(logging.Formatter):
>>> def format(self, record):
>>> msg=logging.Formatter.format(self, record)
>>> if isinstance(msg, str):
>>> msg=msg.dec
Rickard Lindberg wrote:
>> I tried posting on python-ideas and received a "You are not allowed to
>> post to this mailing list" reply. Perhaps because I am posting through
>> Google groups? Or maybe one must be an approved member to post?
>
> If you got an "awaiting moderator approval" message you
Paul Rubin wrote:
> Lie Ryan writes:
>> I guess in python, None as the missing datum idiom is still quite prevalent:
>
> Well, sometimes there is no way around it, but:
>
>> def cat_list(a=None, b=None):
>> # poor man's list concatenation
>&g
Klone wrote:
> Hi all. I believe in programming there is a common consensus to avoid
> code duplication, I suppose such terms like 'DRY' are meant to back
> this idea. Anyways, I'm working on a little project and I'm using TDD
> (still trying to get a hang of the process) and am trying to test the
tsangpo wrote:
> Just a shorter implementation:
>
> from itertools import groupby
> def split(lst, func):
> gs = groupby(lst, func)
> return list(gs[True]), list(gs[False])
>
As you're replying to my post, I assume you meant a shorter
implementation my function. But it doesn't do the sam
superpollo wrote:
>> First problem I see is all those numbers before the lines. That's not
>> valid python.
>>
>> Assuming that was a transcription error
>
> not so. i intentionally add linenumbers to facilitare reference to the
> code, but if it is a nuisance i will not include them anymore.
Th
kj wrote:
> I'm will be teaching a programming class to novices, and I've run
> into a clear conflict between two of the principles I'd like to
> teach: code clarity vs. code reuse. I'd love your opinion about
> it.
Sometimes when the decision between clarity and generality becomes too
hard; you
Steven D'Aprano wrote:
> On Thu, 02 Jul 2009 11:19:40 +, kj wrote:
>
>> I'm sure that it is possible to find cases in which the *current*
>> implementation of re.search() would be inefficient, but that's because
>> this implementation is perverse, which, I guess, is ultimately the point
>> of
Brad wrote:
> On Jul 3, 12:57 am, Steven D'Aprano cybersource.com.au> wrote:
>> I've never needed such a split function, and I don't like the name, and
>> the functionality isn't general enough. I'd prefer something which splits
>> the input sequence into as many sublists as necessary, according t
mclovin wrote:
> OK then. I will try some of the strategies here but I guess things
> arent looking too good. I need to run this over a dataset that someone
> pickled. I need to run this 480,000 times so you can see my
> frustration. So it doesn't need to be "real time" but it would be nice
> it wa
Paul Rubin wrote:
> Steven D'Aprano writes:
>> "if len(x) == 0" is wasteful. Perhaps I've passed you a list-like
>> iterable instead of a list, and calculating the actual length is O(N).
>
> That doesn't happen in any of Python's built-in container types. I
> could see some value to having a g
Steven D'Aprano wrote:
> On Sun, 05 Jul 2009 11:37:49 +0000, Lie Ryan wrote:
>
>> Neither python's `if` nor `if` in formal logic is about testing True vs.
>> False. `if` in python and formal logic receives a statement. The
>> statement must be evaluatable to True
Chris Rebert wrote:
> On Mon, Jul 6, 2009 at 1:29 AM, Lawrence
> D'Oliveiro wrote:
>> In message , Tim Golden
>> wrote:
>>
>>> The difficulty here is knowing where to put such a warning.
>>> You obviously can't put it against the "++" operator as such
>>> because... there isn't one.
>> This bug is
Aahz wrote:
> In article <[email protected]>,
> Steven D'Aprano wrote:
>> On Mon, 06 Jul 2009 14:32:10 +0200, Jean-Michel Pichavant wrote:
>>> kj wrote:
sense = cmp(func(hi), func(lo))
assert sense != 0, "func is not strictly monotonic in [lo, hi]"
>>> As
Nick Daly wrote:
> Hi,
>
> I was wondering if it's possible / if there are any simple methods
> known of storing unit-test functions and their data in separate files?
>
> Perhaps this is a strange request, but it does an excellent job of
> modularizing code. As far as revision control goes, it m
Steven D'Aprano wrote:
> On Tue, 07 Jul 2009 05:13:28 +0000, Lie Ryan wrote:
>
>> When people are fighting over things like `sense`, although sense may
>> not be strictly wrong dictionary-wise, it smells of something burning...
>
> That would be my patience.
>
superpollo wrote:
> Adrian Dziubek wrote:
>> The recommended Debian way is update-alternatives. I find it a bit
>> unintuitive, so I have to read through the documentation every time I
>> use it, but it should be able link a chosen version of python to /usr/
>> bin/python. I don't know if it's set
superpollo wrote:
> Lie Ryan wrote:
>
>> AFAIK, no major linux distributions have officially ported to python
>> 3.x.
>
> http://packages.debian.org/experimental/python3.1
>
> thanks for help
Note the word "experimental"
--
http://mail.python.org/mailman/listinfo/python-list
Emanuele D'Arrigo wrote:
> Greetings,
>
> today I did something like this:
>
> class MyClass(object):
>
> @classmethod
> def myClassMethod(self):
> print "ham"
>
> myProperty = property(myClassMethod, None, None)
>
> As many of you know this doesn't work and returns a Typ
Michael Mossey wrote:
> On Jul 6, 2:47 pm, Philip Semanchuk wrote:
>> On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
>>
>>> What is required in a python program to make sure it catches a
>>> control-
>>> c on the command-line? Do some i/o? The OS here is Linux.
>> You can use a try/except to
brasse wrote:
> Hello!
> I have been thinking about how write exception safe constructors in
> Python. By exception safe I mean a constructor that does not leak
> resources when an exception is raised within it. The following is an
> example of one possible way to do it:
First, your automatic clea
Bruno Desthuilliers wrote:
> Lie Ryan a écrit :
>> Emanuele D'Arrigo wrote:
> (snip)
>>> Ultimately all I want is a non-callable class-level attribute
>>> MyClass.myProperty that gives the result of MyClass.myClassMethod().
>>
>> This works like what
superpollo wrote:
> Lie Ryan wrote:
>> superpollo wrote:
>>
>>> Lie Ryan wrote:
>>>
>>>
>>>> AFAIK, no major linux distributions have officially ported to python
>>>> 3.x.
>>>
>>> http://packages.debian.
Friðrik Már Jónsson wrote:
> Hi Rhodri,
>
>> It's only really a pitfall if you try to use the built-in after you've
>> redefined it. That's the thing to keep an eye open for.
>
> You're right, but in cases where you're editing a codebase which you
> didn't author entirely by yourself you may not
Simon Forman wrote:
> On Thu, Jul 9, 2009 at 9:42 AM, Nick wrote:
>
>>fields = line.split()
>>for i in range(len(fields)):
>>fields[i] = float(fields[i])
>
>
> instead of the above code you could say:
>
> fields = [float(n) for n in in line.split()]
>
> Have fun getting back in
Xavier Ho wrote:
> oops, wrong address.
>
> When will reply-to tag appear on the Python mailing list? =/
>
> Good idea, Steven and MRAB.
>
> I changed my code to the following:
>
>
> def nPrime(self, n):
> "Returns nth prime number, the first one being 2, where n = 0.
> When n = 1,
Gnarlodious wrote:
> In an interactive session (I am using iPython), what is the most
> elegant way to run a Python script from Terminal? Right now I am
> saying:
>
> import subprocess
> subprocess.call("python /path/to/scriptname.py", shell=True)
>
> But I am calling a shell process and I'd rath
Tim Edwards wrote:
>> Which OS? How did you install it?
>
> Sorry (see I need that coffee)
>
> Installed on redhat from source
You should consult the distro's (i.e. RedHat's) documentation/mailing
list about changing the default python interpreter. In most cases, you
will need to make sure all p
Inky 788 wrote:
> On Jul 22, 7:15 am, Tim Golden wrote:
>> Mark du Preez wrote:
>>> Hi
>>> Can anyone tell me where to go to suggest changes to the Python
>>> documentation?
>> Drop an entry in the tracker:
>>
>> http://bugs.python.org
>>
>> Patches are always welcome,
>
> Could you please provi
jorma kala wrote:
> Hi,
> Do you know where I can find the rules for documenting Python code, so
> that automatic document generation with Pydoc makes the most of the
> comments inserted in the code?
> I know about documenting class and method through triple quote just
> under the class definition.
In my laptop, socket.gethostname() returned my username, and causing one
of python's "make test" regression test to error (test_socket):
==
ERROR: testSockName (test.test_socket.GeneralModuleTests)
HPJ wrote:
And by the way, the reason I've come across this problem at all is
because I have something like this:
class A:
class X:
n = 'a'
x = X()
class B(A):
class X(A.X):
n = 'b'
# x = X()
The line commented out was originally not there, but I found out I had
to add it if I wa
Donn wrote:
Python 2.6
PIL Version: 1.1.6-3ubuntu1
libfreetype6 Version: 2.3.9-4ubuntu0.1
Hello,
I have a feeling I've asked this in the distant past, but it's recently
emerged as a bug in my app so can anyone point me in the right direction?
In Fonty Python, when I draw the fa
Anh Hai Trinh wrote:
Hello all,
I just want to share with you something that I've worked on recently.
It is a library which implements streams -- generalized iterators with
a pipelining mechanism and lazy-evaluation to enable data-flow
programming in Python.
The idea is to be able to take the o
Lennyboi wrote:
Can I declare an array of variables in python like in C
int p[10];
I looked everywhere, but I don't find any mention of it.
p = []
--
http://mail.python.org/mailman/listinfo/python-list
Donn wrote:
On Saturday 12 September 2009 17:30:19 garabik-
[email protected] wrote:
apt-get install unicode
unicode 0100..
Nice tip, thanks.
if you see a lot of accented letters (and not squares or question marks),
you can be sure
I see the accented chars -- so now I am m
Robin Becker wrote:
Python is often put forward as a as a finger friendly language, but we
have capitals encouraged for user class names and for some common values
eg None, True, False these are required.
And I'm glad it is, or else I'll get a finger-sore and an eye-sore
--
http://mail.pyth
r wrote:
On Sep 15, 4:12 am, Hendrik van Rooyen
wrote:
(snip)
When a language lacks a word for a concept like "window", then (I
believe :-) ), it kind of puts a crimp in the style of thinking that a
person will do, growing up with only that language.
Are you telling us people using a langua
r wrote:
Not that I agree that it would be a Utopia, whatever the language - more like
a nightmare of Orwellian proportions - because the language you get taught
first, moulds the way you think. And I know from personal experience that
there are concepts that can be succinctly expressed in on
r wrote:
You're on a slippery slope when you claim that people deserve whatever
mistreatment or misfortune comes their way through mere circumstances
of birth. I suggest you step back and actually read your messages
again and consider how others might interpret them.
Paul: civilizations rise an
Terry Reedy wrote:
Lie Ryan wrote:
Note that when the python interpreter meets this statement:
class B(P):
def foo(self):
print('ab')
X = 'f'
the compiler sees a class statement -> create a new blank class
->
On 09/01/10 17:06, Stefan Behnel wrote:
> MRAB, 31.08.2010 23:53:
>> On 31/08/2010 21:18, Terry Reedy wrote:
>>> On 8/31/2010 12:33 PM, Aleksey wrote:
On Aug 30, 10:38 pm, Tobias Weber wrote:
> Hi,
> whenever I type an "object literal" I'm unsure what optimisation
> will do
> t
On 09/01/10 00:09, Aahz wrote:
> In article ,
> Jerry Hill wrote:
>> On Mon, Aug 30, 2010 at 7:42 PM, Aahz wrote:
>>>
>>> Possibly; IMO, people should not need to run timeit to determine basic
>>> algorithmic speed for standard Python datatypes.
>>
>> http://wiki.python.org/moin/TimeComplexity t
On 09/12/10 00:33, Bearophile wrote:
>
>
> Lately while I program with Python one of the D features that I most
> miss is a built-in Design By Contract (see PEP 316), because it avoids
> (or helps me to quickly find and fix) many bugs. In my opinion DbC is
> also very good used w
On 09/12/10 08:53, John Nagle wrote:
> On 9/11/2010 9:36 AM, Lie Ryan wrote:
>> On 09/12/10 00:33, Bearophile wrote:
>>
>>>
>>>
>>> Lately while I program with Python one of the D features that I most
>>> miss is a built-in
On 09/16/10 03:38, Ed Greenberg wrote:
> I'm pretty new to Python, but I am really enjoying it as an alternative
> to Perl and PHP.
>
> When I run the debugger [import pdb; pdb.set_trace()] and then do next
> and step, and evaluate variables, etc, when I hit 'c' for continue, we
> go to the end, j
On 09/17/10 07:46, John Nagle wrote:
>There's a tendency to use "dynamic attributes" in Python when
> trying to encapsulate objects from other systems. It almost
> works. But it's usually a headache in the end, and should be
> discouraged. Here's why.
I personally love them, they makes XML
I was expecting this to work:
import logging
logger = logging.getLogger(__name__)
logger.warn('this is a warning')
instead it produced the error:
No handlers could be found for logger "__main__"
However, if instead I do:
import logging
logging.warn('creating logger')
logger = lo
On 09/18/10 03:53, Ethan Furman wrote:
> Lie Ryan wrote:
> [snip]
>> And even dict-syntax is not perfect for accessing XML file, e.g.:
>>
>>
>> foo
>> bar
>>
>>
>> should a['b'] be 'foo' or 'bar'?
>
&
On 09/19/10 17:31, Seebs wrote:
> Basically, think of what happens as I read each symbol:
>
> x = x + 1 if condition else x - 1
>
> Up through the '1', I have a perfectly ordinary assignment of a value.
> The, suddenly, it retroactively turns out that I have misunderstood
> everything
On 09/20/10 19:59, Tim Harig wrote:
> On 2010-09-20, Steven D'Aprano wrote:
>> On Mon, 20 Sep 2010 05:46:38 +, Tim Harig wrote:
>>
I'm not particularly convinced that these are *significant* complaints
about URL-shorteners. But I will say, of the last couple hundred links
I've
On 09/22/10 02:44, Diez B. Roggisch wrote:
> Antoine Pitrou writes:
>
>> On Tue, 21 Sep 2010 17:59:27 +0200
>> [email protected] (Diez B. Roggisch) wrote:
>>>
>>> The problems explained are simply outdated and crippled python
>>> versions.
>>>
>>> And to me, a python version installed that has not th
On 09/30/10 11:17, Seebs wrote:
> On 2010-09-30, RG wrote:
>> That the problem is "elsewhere in the program" ought to be small
>> comfort.
>
> It is, perhaps, but it's also an important technical point: You CAN write
> correct code for such a thing.
>
>> int maximum(int a, int b) { return a >
On 09/30/10 16:09, TheFlyingDutchman wrote:
>
>>
>> That argument can be made for dynamic language as well. If you write in
>> dynamic language (e.g. python):
>>
>> def maximum(a, b):
>> return a if a > b else b
>>
>> The dynamic language's version of maximum() function is 100% correct --
>> i
On 10/01/10 00:24, TheFlyingDutchman wrote:
>
>>
>>> If I had to choose between "blow up" or "invalid answer" I would pick
>>> "invalid answer".
>>
>> there are some application domains where neither option would be
>> viewed as a satisfactory error handling strategy. Fly-by-wire, petro-
>> chemic
On 10/02/10 20:04, Nick Keighley wrote:
>>> > > In a statically typed language, the of-the-wrong-type is something which
>>> > > can, by definition, be caught at compile time.
>> >
>> > Any time something is true "by definition" that is an indication that
>> > it's not a particularly useful fact.
>
On 10/05/10 14:36, salil wrote:
> So, the programmer who
> specifically mentions "Int" in the signature of the function, is
> basically overriding this default behavior for specific reasons
> relevant to the application, for example, for performance. I think
> Haskell's way is the right.
I agree
On 10/01/10 23:56, BartC wrote:
>
> "Pascal J. Bourguignon" wrote in message
> news:[email protected]...
>> "BartC" writes:
>>
>>> "Pascal J. Bourguignon" wrote in message
>
When Intel will realize that 99% of its users are running VM
>>>
>>> Which one?
>>
>> Any
On 10/24/10 21:37, huisky wrote:
> Hi,
>
> I'm trying to use the interactive mode under DOS for Python 2.7. As a
> newbie, I do NOT know what is the following problem:
>
world_is_flat=1
if world_is_flat:
> .. . . print "be carefule to be not fall out!"
> File "", line 2
> prin
On 10/24/10 16:01, Steve Holden wrote:
> I was somewhat surprised to discover that Python 3 no longer allows an
> exception to be raised in an except clause (or rather that it reports it
> as a separate exception that occurred during the handling of the first).
FYI, Java has a similar behavior. In
On 10/26/10 06:56, Steve Holden wrote:
> On 10/25/2010 3:11 PM, kj wrote:
>> In Steve Holden
>> writes:
>>
>>> On 10/25/2010 10:47 AM, rantingrick wrote:
On Oct 25, 5:07 am, kj wrote:
> In "The Zen of Python", one of the "maxims" is "flat is better than
> nested"? Why? Can anyone
1001 - 1100 of 1115 matches
Mail list logo