On 02/21/10 12:02, Stef Mientki wrote:
> On 21-02-2010 01:21, Lie Ryan wrote:
>>> On Sun, Feb 21, 2010 at 12:52 AM, Stef Mientki
wrote:
>>>
>>>> hello,
>>>>
>>>> I would like my program to continue on the next line after an uncaught
On 02/21/10 19:27, lallous wrote:
> If the base defines the method and it was empty, then my C++ code
> would still call the function. This is not optimal because I don't
> want to go from C++ to Python if the _derived_ class does not
> implement the cb.
That sounds like a microoptimization; hav
On 02/21/10 15:21, Steven D'Aprano wrote:
>> > So it looks like variables in a list are stored as object references.
> Python doesn't store variables in lists, it stores objects, always.
>
> Even Python variables aren't variables *grin*, although it's really
> difficult to avoid using the term. P
On 02/22/10 19:43, Norman Rieß wrote:
> Am 02/22/10 09:02, schrieb Steven D'Aprano:
>> On Mon, 22 Feb 2010 07:49:51 +0100, Norman Rieß wrote:
>>
>>
>>> This is the actual code:
>>>
>>> source_file = bz2.BZ2File(file, "r")
>>> for line in source_file:
>>> print line.strip()
>>>
>>> print "E
On 02/24/10 05:25, Michael Rudolf wrote:
> Just a quick question about what would be the most pythonic approach in
> this.
>
> In Java, Method Overloading is my best friend, but this won't work in
> Python:
> So - What would be the most pythonic way to emulate this?
> Is there any better Idom tha
On 02/24/10 11:21, Aahz wrote:
> In article ,
> D'Arcy J.M. Cain wrote:
>> On Tue, 23 Feb 2010 02:54:25 -0800 (PST)
>> Joan Miller wrote:
>>>
>>> *Sorry by this message off topic, but this is too important*
>>
>> Is it just me or has the spew from gmail on this list radically
>> increased in the
On 02/23/10 05:30, W. eWatson wrote:
> On 2/22/2010 8:29 AM, Grant Edwards wrote:
>> On 2010-02-22, W. eWatson wrote:
>>
>>> Last night I copied a program from folder A to folder B.
>>
>> [tail of various windows breakages elided]
>>
>>> Comments?
>>
>> Switch to Linux?
>>
>> Or at least install C
On 02/24/10 12:08, Nobody wrote:
> On Wed, 24 Feb 2010 12:22:05 +1300, Lawrence D'Oliveiro wrote:
>
>>> Java - The JVM code been hacked to death by Sun engineers (optimised)
>>> Python - The PVM code has seen speed-ups in Unladen or via Pyrex..
>>> ad-infinitum but nowhere as near to JVM
>>
>> Pyt
On 02/24/10 12:38, Steven D'Aprano wrote:
> On Wed, 24 Feb 2010 00:06:09 +0100, Daniel Fetchinson wrote:
>
>>> Hmm. I wonder if all the spam is coming from the NG side. I'll have
>>> to look at that. One of the reasons that I stopped reading UseNet over
>>> ten years ago was because of the dimi
On 02/24/10 14:09, Robert Kern wrote:
> On 2010-02-23 20:43 , Steven D'Aprano wrote:
>> On Wed, 24 Feb 2010 02:40:13 +, Steven D'Aprano wrote:
>>
>>> On Tue, 23 Feb 2010 15:36:02 +0100, mk wrote:
>>>
The question is: is this secure? That is, can the string generated this
way be consid
On 02/24/10 17:07, MattB wrote:
> All -- problem solved. Following Lie's suggestions, and the links
> from those pages, I went hunting around in my /library/preferences/
> SystemConfiguration/. I opened all of the 6 or 7 files that were in
> there, and all looked as if they contained info directl
On 02/25/10 07:40, Wanja Gayk wrote:
> Am 24.02.2010, 00:22 Uhr, schrieb Lawrence D'Oliveiro
> :
>
>>> Java - The JVM code been hacked to death by Sun engineers (optimised)
>>> Python - The PVM code has seen speed-ups in Unladen or via Pyrex..
>>> ad-infinitum but nowhere as near to JVM
>>
>> Pyth
On 02/25/10 05:18, kj wrote:
> I think I remember, early in my learning of Python, coming across
> the commandment "THOU SHALT NOT USE TRIPLE-QUOTES TO COMMENT-OUT
> LINES OF CODE", or something to that effect. But now I can't find
> it!
I've never heard of it, though I can think of a few reasons
On 03/02/10 00:09, Andreas Waldenburger wrote:
> On Mon, 1 Mar 2010 05:01:49 -0800 (PST) alex23
> wrote:
>
>> Andreas Waldenburger wrote:
>>> But as I said: a) I am (we are) not in a position to impose this (We
>>> don't work with the code, we just run the software).
>>
>> I personally believe t
On 02/25/2010 06:16 AM, mk wrote:
> On 2010-02-24 20:01, Robert Kern wrote:
>> I will repeat my advice to just use random.SystemRandom.choice() instead
>> of trying to interpret the bytes from /dev/urandom directly.
>
> Out of curiosity:
>
> def gen_rand_string(length):
> prng = random.System
On 03/03/2010 09:47 AM, TomF wrote:
> On 2010-03-02 13:14:50 -0800, R Fritz said:
>
>> On 2010-02-28 06:31:56 -0800, sstein...@gmail.com said:
>>>
>>> On Feb 28, 2010, at 9:28 AM, Someone Something wrote:
>>>
Is there something like cpan for python? I like python's syntax, but
Iuse perl
On 03/03/2010 04:48 PM, Steven D'Aprano wrote:
> Or one can simply use *reason*: what justification is there for putting
> comments in strings at the top of the function? The only one I can see is
> if you are writing for an embedded device, you may want to remove doc
> strings to save memory --
On 03/03/2010 08:27 PM, Oren Elrad wrote:
> Howdy all, longtime appreciative user, first time mailer-inner.
>
> I'm wondering if there is any support (tepid better than none) for the
> following syntactic sugar:
>
> silence:
> . block
>
> ->
>
> try:
> .b
On 03/07/2010 05:53 PM, Ping wrote:
> Hi,
>
> I'm trying to find a way to create an asynchronous HTTP client so I
> can get responses from web servers in a way like
>
> async_http_open('http://example.com/', callback_func)
> # immediately continues, and callback_func is called with response
>
On 03/17/2010 05:59 AM, Jason Tackaberry wrote:
> On Tue, 2010-03-16 at 10:04 +0100, Bruno Desthuilliers wrote:
>> Answer here:
>>
>> http://wiki.python.org/moin/FromFunctionToMethod
>
> I have a sense I used to know this once upon a time, but the question
> came to my mind (possibly again) and I
On 03/17/2010 04:32 PM, Steven D'Aprano wrote:
> On Wed, 17 Mar 2010 15:57:17 +1100, Lie Ryan wrote:
>
>> Most people probably would never need to use
>> descriptor protocol directly, since the immediate benefit of descriptor
>> protocol are property(), clas
On 03/17/2010 08:12 PM, Bruno Desthuilliers wrote:
> Patrick Maupin a écrit :
>> On Mar 16, 1:59 pm, Jason Tackaberry wrote:
>>> Why not create the bound methods at instantiation time, rather than
>>> using the descriptor protocol which has the overhead of creating a new
>>> bound method each time
On 03/22/2010 07:07 PM, Steven D'Aprano wrote:
> Perhaps you should have said that it was a wrapper around deque giving
> richer functionality, rather than giving the impression that it was a
> brand new data structure invented by you. People are naturally going to
> be more skeptical about a ne
On 03/29/2010 01:59 AM, Steven D'Aprano wrote:
> On Sun, 28 Mar 2010 06:48:21 +1100, Lie Ryan wrote:
>
>> On 03/22/2010 07:07 PM, Steven D'Aprano wrote:
>>> Perhaps you should have said that it was a wrapper around deque giving
>>> richer functionality, r
On 03/27/2010 10:28 PM, Jonathan Hartley wrote:
> one might like to name the complex block of logic, just to make it
> readable:
>
>
> x = 1
> def account_for_non_square_pixels(x):
>((some complex logic))
> account_for_non_square_pixels()
> y = 2
>
>
> But defining and then calling the func
On 04/02/10 13:01, Patrick Maupin wrote:
> On Apr 1, 7:49 pm, Tim Chase wrote:
>> David Robinow wrote:
>>> $ python -c "print 1/2 * 1/2"
>>> 0
>>
>>> But that's not what I learned in grade school.
>>> (Maybe I should upgrade to 3.1?)
>>
>> That's because you need to promote one of them to a float
On 04/02/10 11:25, Abethebabe wrote:
> I've recently finished reading A Byte Of Python and have the basics of
> Python down. I want to continue practice but I'm unsure what I can do.
> So I started looking for tutorials to open my mind a little, but
> everything I come across are beginner tutorials
On 04/03/10 06:24, John Bokma wrote:
>>
>> you think virtualbox could help? i wonder if one could run linux/
>> py2exe virtually on a win machine and get it working.
>
> Of course that works, a virtual windows machine is just a windows
> machine ;-).
>
> Also that you can't do a "cross compilatio
On 12/05/10 10:43, Jorge Biquez wrote:
> I do not see a good reason for not using Sqlite3 BUT if for some reason
> would not be an option what plain schema of files would you use?
Assuming you don't want SQL, you can use filesystem-based database. Most
people doesn't realize that a filesystem
On 12/05/10 15:52, Tim Harig wrote:
> On 2010-12-05, Tim Harig wrote:
>> Another, questionable but useful use, is to ignore the complex accounting
>> of your position inside of a complex data structure. You can continue
>> moving through the structure until an exception is raised indicating
>> th
On 12/11/10 11:37, Dan Stromberg wrote:
> On Fri, Dec 10, 2010 at 3:51 PM, John Nagle wrote:
>> On 12/10/2010 3:25 PM, Stefan Behnel wrote:
>>> Benjamin Kaplan, 11.12.2010 00:13:
On Fri, Dec 10, 2010 at 5:46 PM, Octavian Rasnita wrote:
The only scopes Python has are module and function.
On 12/11/10 23:43, Octavian Rasnita wrote:
> Hi,
>
> Is there a "recommended" Python distribution for Windows XP?
>
> I know about the one that can be downloaded from python.org (which I am using
> for the moment) and the one offered by ActiveState but I don't know which one
> is better for a b
On 04/04/10 13:01, Patrick Maupin wrote:
> On Apr 3, 9:24 pm, Steven D'Aprano cybersource.com.au> wrote:
>> To put it another way, even though there are an infinite number of
>> rationals, they are vanishingly rare compared to the irrationals. If you
>> could choose a random number from the real n
On 04/05/10 20:31, sapient wrote:
> Hello.
>
> I found several discussions where this question was asked, but was not
> answered.
Why would you want to translate docstring? Docstring is meant for
developers not users. Maintaining a translated docstring is going to be
a maintenance hell and will e
On 04/06/10 02:38, ejetzer wrote:
> On 5 avr, 12:36, ejetzer wrote:
>> For a school project, I'm trying to make a minimalist web browser, and
>> I chose to use Tk as the rendering toolkit. I made my parser classes
>> into Tkinter canvases, so that I would only have to call pack and
>> mainloop fun
On 04/06/10 12:38, Peng Yu wrote:
> I want to show what commands have been executed when I run a python
> script. Is there an option which can instruct python to print the
> commands automatically?
>
> (If you are familiar with R, what I am asking is essentially
> options(echo=T) in R.)
>
It's n
On 04/06/10 18:42, Alain Ketterlin wrote:
> Alain Ketterlin writes:
>
>> d = dict()
>> for r in [1,2,3]:
>> d[r] = [r for r in [4,5,6]]
>> print d
>
> Thanks to Chris and Paul for the details (the list comp. r actually
> leaks). I should have found this by myself.
>
> My background is more
On 04/07/10 00:16, Albert van der Horst wrote:
> In article ,
> Peter Otten <__pete...@web.de> wrote:
>> Pierre Quentel wrote:
>>
>>> I'm surprised nobody proposed a solution with itertools ;-)
>>
>> next(itertools.takewhile(lambda _: a == b, ["yes"]), "no")
>
> I could learn something here, if y
On 04/06/10 23:52, Tim Arnold wrote:
> Hi,
> I have a few classes that manipulate documents. One is really a
> process that I use a class for just to bundle a bunch of functions
> together (and to keep my call signatures the same for each of my
> manipulator classes).
>
> So my question is whether
On 04/07/10 03:23, gerardob wrote:
> The error below appears. In the case i remove the comment to initialize m2,
> the same thing happens. Any ideas on how to fix this?
>
When unpickling a user-defined class, you unpickling module must have
access to the original class definition. This means if
On 04/06/10 19:52, sapient wrote:
> Lie Ryan, thank you for your answer!
>> Why would you want to translate docstring? Docstring is meant for
>> developers not users.
> I have mentioned that I want to provide API for existing image-
> processing applicaion in Python.
> In
On 04/07/10 02:22, Grant Edwards wrote:
> On 2010-04-06, Grant Edwards wrote:
>> On 2010-04-06, Jean-Michel Pichavant wrote:
>>> Pablo Recio Quijano wrote:
Why must be commercial, when there is open and free alternatives? Like
GNU Plot.
>>>
>>> Gnuplot is ugly. I'm using it because I d
On 04/06/10 19:47, Peter Otten wrote:
> Tim Eichholz wrote:
>
>> I think maybe I am using the wrong function. I want to paste the
>> entire 192x192 contents of cols[f] into newimage. I would think it
>> works like newimage.paste(cols[f], (x, 0, 192+x, 192)) if that's not
>> it I think I'm missing
On 04/07/10 04:11, Gustavo Narea wrote:
> Hello!
>
> Could you please confirm whether my understanding of equality
> operations in sets and lists is correct? This is how I think things
> work, partially based on experimentation and the online documentation
> for Python:
>
> When you compare two l
On 04/07/10 14:18, Steven D'Aprano wrote:
> I could have used None, or "root", or "this is a magic value that
> probably won't clash with an entry in the tree", or -1 as a sentinel
> instead, but they all risk accidental clashes with tree entries.
Especially when you want to consider the possibi
On 04/07/10 18:34, Bruno Desthuilliers wrote:
> Lie Ryan a écrit :
> (snip)
>
>> Since in function in python is a first-class object, you can instead do
>> something like:
>>
>> def process(document):
>> # note: document should encapsulate its
On 04/08/10 12:45, Patrick Maupin wrote:
> (And I got testy because of seeing other IMO unwarranted denigration
> of re on the list lately.)
Why am I seeing a lot of this pattern lately:
OP: Got problem with string
+- A: Suggested a regex-based solution
+- B: Quoted "Some people ... r
On 4/9/10, Tim Chase wrote:
> Lie Ryan wrote:
>> Why am I seeing a lot of this pattern lately:
>>
>> OP: Got problem with string
>> +- A: Suggested a regex-based solution
>>+- B: Quoted "Some people ... regex ... two problems."
>>
>>
On 04/09/10 06:54, M. Hamed wrote:
> Thanks Patrick, that is what I was exactly looking for.
>
> Paul, thanks for your example. wasn't familiar with the stack class.
The stack class is nothing but a wrapper that renames append() to
push(); everything you need can be fulfilled by the regular list
On 04/09/10 06:36, Robert Kern wrote:
> On 2010-04-08 15:08 PM, M. Hamed wrote:
>
>> On the other hand (other than installing NumPy) is there a built-in
>> way to do an array full of zeros or one just like the numpy.zeros()? I
>> know I can do it with list comprehension (like [0 for i in
>> range(
On 04/09/10 08:52, Ben Racine wrote:
> I have a list...
>
> ['dir_0_error.dat', 'dir_120_error.dat', 'dir_30_error.dat',
> 'dir_330_error.dat']
>
> I want to sort it based upon the numerical value only.
>
> Does someone have an elegant solution to this?
>
> Thanks,
> Ben R.
list.sort() and s
On 04/08/10 18:20, Bruno Desthuilliers wrote:
> Lie Ryan a écrit :
>> On 04/07/10 18:34, Bruno Desthuilliers wrote:
>>> Lie Ryan a écrit :
>>> (snip)
>>>
>>>> Since in function in python is a first-class object, you can instead do
>
On 04/09/10 12:32, Dotan Cohen wrote:
>> Regexes do have their uses. It's a case of knowing when they are the
>> best approach and when they aren't.
>
> Agreed. The problems begin when the "when they aren't" is not recognised.
But problems also arises when people are suggesting overly complex
ser
On 04/09/10 18:59, Steven D'Aprano wrote:
> On Fri, 09 Apr 2010 14:48:22 +1000, Lie Ryan wrote:
>
>> On 04/09/10 12:32, Dotan Cohen wrote:
>>>> Regexes do have their uses. It's a case of knowing when they are the
>>>> best approach and when they aren&
On 04/10/10 16:24, Mark Tolonen wrote:
>
> "Chris Rebert" wrote in message
> news:y2o50697b2c1004091304u627d99bfj44ad56fa76a3c...@mail.gmail.com...
>> On Fri, Apr 9, 2010 at 11:43 AM, John Nagle wrote:
>>> Chris Rebert wrote:
On Fri, Apr 9, 2010 at 8:04 AM, Peyman Askari
wrote:
>
On 04/12/10 08:43, andrew cooke wrote:
>
> Is the third case here surprising to anyone else? It doesn't make
> sense to me...
>
> Python 2.6.2 (r262:71600, Oct 24 2009, 03:15:21)
> [GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2
> Type "help", "copyright", "credits" or "license" for more
On 04/12/10 04:54, Mensanator wrote:
> On Apr 11, 11:53�am, Steven D'Aprano cybersource.com.au> wrote:
>> On Sat, 10 Apr 2010 21:08:44 -0700, Mensanator wrote:
> 3.x won't be adopted by developers until it's fixed. As of now, it's
> seriously broken and unsuitable for production.
>>
I
On 04/16/10 12:17, Dave W. wrote:
>>> I naively thought I could capture output from exec()'ed print
>>> invocations by (somehow) overriding 'print' globally. But this
>>> seems not to be possible.
>
>>
>>old_print = __builtins__.print
>>__builtins__.print = printhook
>>yield
>>_
On 04/16/10 21:29, MRAB wrote:
> Alf P. Steinbach wrote:
>> I thought I'd report this so I tried it several times more but unable
>> to reproduce: instead of above hang + crash + truncated traceback the
>> complete expected traceback appeared and the program terminated properly.
>>
>> Can anyone re
On 04/13/10 06:36, Martin v. Loewis wrote:
> Microsoft has just released Visual Studio 2010, along with its free (of
> charge) Express edition. Following a tradition, they are likely to
> withdraw support and availability for VS 2008 Express some time in the
> future.
If only Python could do that,
On 04/16/10 22:09, Robin Becker wrote:
> On 12/04/2010 21:36, Martin v. Loewis wrote:
> ...
>>
>> If you are planning to build Python extension modules in the next five
>> years, I recommend that you obtain a copy of VS Express, just in case
>> Microsoft removes it from their servers. As me
On 04/15/10 02:03, Paul Rubin wrote:
> Raymond Hettinger writes:
>> Not sure what the readability issue is. The phrase "nlargest(2,
>> iterable)" does exactly what it says, finds the 2 largest elements
>> from an iterable. That makes the programmer's intent more clear than
>> the slower, but sem
On 04/16/10 02:30, Terry Reedy wrote:
> On 4/15/2010 9:34 AM, Дамјан Георгиевски wrote:
>> I'm writing this as a complete newbie (on the issue), so don't be
>> surprised if it's the stupidest idea ever.
>>
>> I was wondering if there was ever a discusision in the python community
>> on a 'raise-yie
On 04/16/10 23:41, J wrote:
> Ok... I know pretty much how .extend works on a list... basically it
> just tacks the second list to the first list... like so:
>
lista=[1]
listb=[2,3]
lista.extend(listb)
print lista;
> [1, 2, 3]
>
> what I'm confused on is why this returns None:
On 04/16/10 19:28, Jonathan Hartley wrote:
> I'm playing with ideas of what API to expose. My favourite one is to
> simply embed ANSI codes in the stream to be printed. Then this will
> work as-is on Mac and *nix. To make it work on Windows, printing could
> be done to a file0-like object which wra
On 04/15/10 06:38, pyt...@bdurham.com wrote:
> Alex,
>
>> I do not see anything about redistribution, only installation, unless I am
>> missing something?
>
> I read "installation" to mean the same as "redistribution" in the
> context of this article. Perhaps I'm wrong?
>
Does it makes sense t
On 04/17/10 03:40, pyt...@bdurham.com wrote:
> Lie,
>
>> Does it makes sense to be able to install a library in other's computer, but
>> not redistribute it? Hmm... I'll have to consult a lawyer.
>
> See Tim Robert's response (I can't remember which Python mailing list)
>
I was responding to A
On 04/17/10 16:20, Gregory Ewing wrote:
> Steven D'Aprano wrote:
>> On Wed, 14 Apr 2010 22:10:28 +0200, Hans Mulder wrote:
>>
>>
Anybody who invents another brace-delimited language should be beaten.
You always end up with a big problem trying to make sure the braces are
consistent w
On 04/17/10 21:23, Lawrence D'Oliveiro wrote:
> In message
> , gelonida
> wrote:
>
>> I've been told, that following code snippet is not good.
>>
>> open("myfile","w").write(astring) ...
>
> I do that for reads, but never for writes.
>
> For writes, you want to give a chance for write errors t
On 04/18/10 00:13, Simon Brunning wrote:
> On 17 April 2010 09:03, David Zhang wrote:
>> I have started an open source project to develop human-level
>> Artificial Intelligence...
>
> Have you people never seen Terminator? Sheesh.
Ssshhh, you're disclosing our top-secret plan...
--
http://mail.
On 04/19/10 03:06, Martin P. Hellwig wrote:
> On 04/18/10 12:49, Tim Diels wrote:
>> Hi
>>
>> I was thinking of writing a GUI toolkit from scratch using a basic '2D
>> library'. I have already come across the Widget Construction Kit.
>>
>> My main question is: Could I build a GUI toolkit of reasona
On 04/24/10 06:07, Aahz wrote:
> In article <4bc120bd$0$8850$c3e8...@news.astraweb.com>,
> Steven D'Aprano wrote:
>>
>> I can only think of two circumstances where old-style classes are
>> *wrong*: if you use multiple inheritance with a diamond diagram ("...now
>> you have THREE problems" *wink
On 04/26/10 02:37, Jonathan Fine wrote:
>
> I don't know if the quadratic running time is an issue for my purpose.
It's not until you decide it's yes.
--
http://mail.python.org/mailman/listinfo/python-list
On 04/27/10 03:50, Peter Otten wrote:
> It is a bit unfortunate that your editor has side effects on your program,
> and I recommend that you never trust the result of importing a module from
> within idle's shell completely.
In fact, never trust IDLE. IDLE is a nice IDE when the alternative is
On 04/27/10 18:01, Peter Otten wrote:
> Lie Ryan wrote:
>
>> In fact, never trust IDLE. IDLE is a nice IDE when the alternative is
>> Notepad; but for serious work, you need a real IDE or a programmer's
>> text editor (vim or emacs, whichever side you're in).
On 04/27/10 08:41, Andrej Mitrovic wrote:
> Although I agree, moving away from VS would be nice. Since Unladen
> Swallow will eventually be merged with Python, will the dev team
> consider trying out Clang as an alternative to VS?
What would Unladen Swallow brings that would allow the development
On 04/27/10 10:36, Keith wrote:
> I think it's worth making the print statement (or print function, as
> the case may be) let us do engineering notation, just like it lets us
> specify scientific notation.
The print statement/function does no magic at all in specifying how
numbers look like when.
On 04/27/10 10:47, MRAB wrote:
> Mark Dickinson wrote:
>> On Apr 26, 4:36 am, Keith wrote:
>>> I am considering writing a PEP for the inclusion of an engineering
>>> format specifier, and would appreciate input from others.
>>
>>> [...]
>>
>>> I am thinking that if we simply added something like %
On 04/28/10 15:34, Alf P. Steinbach wrote:
> On 28.04.2010 07:11, * Sagar K:
>> Use triple quote:
>> d = """ this is
>> a sample text
>> which does
>> not mean
>> anything"""
>>
>> "goldtech" wrote in message
>> news:4e25733e-eafa-477b-a84d-a64d139f7...@u34g2000yqu.googlegroups.com...
>> On Apr 27
On 04/29/10 04:16, Alf P. Steinbach wrote:
> On 28.04.2010 18:54, * Lie Ryan:
>> On 04/28/10 15:34, Alf P. Steinbach wrote:
>
> Yes, that's been mentioned umpteen times in this thread, including the
> *very first* quoted sentence above.
>
> It's IMHO sort of nee
On 04/29/10 20:40, Gregory Ewing wrote:
> Lie Ryan wrote:
>> No, the implicit concatenation is there because Python didn't always
>> have triple quoted string. Nowadays it's an artifact and triple quoted
>> string is much preferred.
>
> I don't agree. I
On 04/29/10 16:34, Steven D'Aprano wrote:
> On Thu, 29 Apr 2010 02:16:46 +0100, MRAB wrote:
>
>> Steven D'Aprano wrote:
>>> On Thu, 29 Apr 2010 06:17:42 +1000, Lie Ryan wrote:
>>>
>>>>> Consider that the concatenation language feature probabl
On 04/30/10 13:21, Steven D'Aprano wrote:
> On Fri, 30 Apr 2010 05:41:26 +1000, Lie Ryan wrote:
>
>> On 04/29/10 20:40, Gregory Ewing wrote:
>>> Lie Ryan wrote:
>>>> No, the implicit concatenation is there because Python didn't always
>>>> h
On 04/30/10 12:07, Alf P. Steinbach wrote:
> On 30.04.2010 01:29, * Carl Banks:
>> On Apr 28, 11:16 am, "Alf P. Steinbach" wrote:
>>> On 28.04.2010 18:54, * Lie Ryan:
>>
>>>> Python have triple-quoted string when you want to include large amount
&g
On 04/30/10 05:58, News123 wrote:
> cjw wrote:
> However:
>
> I'd like to read in a spreadsheet, perform only minor modifications and
> write it back with the exact formatting. this is unfortunately not working.
Do you know that Python is one of OpenOffice's macro language? Python
macro have the
On 05/01/10 02:50, Jean-Michel Pichavant wrote:
> Jabapyth wrote:
>> At least a few times a day I wish python had the following shortcut
>> syntax:
> currentCar = Car()
> currentCar = currentCar.nextCar
>
> The syntax you prose will be applicable on very little assignements (use
> case 3). I'm no
On 05/01/10 00:01, Alf P. Steinbach wrote:
> On 30.04.2010 12:51, * Lie Ryan:
>> On 04/30/10 12:07, Alf P. Steinbach wrote:
>>> On 30.04.2010 01:29, * Carl Banks:
>>>> On Apr 28, 11:16 am, "Alf P. Steinbach" wrote:
>>>>> On 28.04.2010 1
On 05/01/10 05:16, Nikolaus Rath wrote:
> Hi,
>
> I'm trying to be very clever:
>
> Apparently Python calls the class attribute __del__ rather than the
> instance's __del__ attribute. Is that a bug or a feature? Is there any
> way to implement the desired functionality without introducing an
> a
On 05/01/10 04:08, Neil Cerutti wrote:
> On 2010-04-30, Lie Ryan wrote:
>> Use triple-quoted, let them flow, done. I've never heard of any
>> text editor in current use without text wrapping capability,
>> even Notepad has it. And if I've got 5k of text in sourc
On 05/01/10 03:56, Alf P. Steinbach wrote:
>>
>> Use triple-quoted, let them flow, done. I've never heard of any text
>> editor in current use without text wrapping capability, even Notepad has
>> it. And if I've got 5k of text in source code without line breaks I
>> wouldn't want that silly strin
On 05/01/10 05:43, Lie Ryan wrote:
> On 05/01/10 03:56, Alf P. Steinbach wrote:
>>>
>>> Use triple-quoted, let them flow, done. I've never heard of any text
>>> editor in current use without text wrapping capability, even Notepad has
>>> it. And if I
On 05/01/10 05:39, Lie Ryan wrote:
> On 05/01/10 05:16, Nikolaus Rath wrote:
>> Hi,
>>
>> I'm trying to be very clever:
>
>>
>> Apparently Python calls the class attribute __del__ rather than the
>> instance's __del__ attribute. Is that a bu
On 05/01/10 06:42, kj wrote:
> I want to define a class attribute that is computed from other
> class attributes. Furthermore, this attribute should be inheritable,
> and its value in the subclasses should reflect the subclasses values
> of the attributes used to compute the computed attribute. I
On 05/01/10 07:54, Alf P. Steinbach wrote:
>
You'd put a 5K line in your source code, + you're working with text
wrapping in your editor.
>>>
>>> In the other hand, you'd put a 5K line in your source code, + you're
>>> writing, debugging, and running a script to wrap and put vari
On 05/01/10 11:16, Steven D'Aprano wrote:
> On Fri, 30 Apr 2010 12:34:34 -0400, D'Arcy J.M. Cain wrote:
>
> In practice though, I think that's a difference that makes no difference.
> It walks like an operator, it swims like an operator, and it quacks like
> an operator.
>
Nope it's not. A ful
On 05/02/10 10:58, Steven D'Aprano wrote:
>> > And Python's object system
>> > makes it that the argument to __getattr__ is always a string even though
>> > there might be a valid variable that corresponds to it:
> That is nothing to do with the object system, it is related to the
> semantics of P
On 05/02/10 10:58, Steven D'Aprano wrote:
> On Sun, 02 May 2010 05:08:53 +1000, Lie Ryan wrote:
>
>> > On 05/01/10 11:16, Steven D'Aprano wrote:
>>> >> On Fri, 30 Apr 2010 12:34:34 -0400, D'Arcy J.M. Cain wrote:
>>> >>
>>
On 05/04/10 07:57, Baz Walter wrote:
> On 03/05/10 19:12, Grant Edwards wrote:
>> On 2010-05-03, Baz Walter wrote:
>>
You requested something that wasn't possible. It failed. What do
you think should have happened?
>>>
>>> path = '../abc.txt'
>>>
>>> os.path.realpath(path) -> "OSError
On 05/05/10 13:25, Scott wrote:
> James,
>
> Thanks for the comprehensive reply. I would like to post it to
> comp.lang.python but the main file is 169 lines long and the file for
> functions is 316 lines long. I'm thinking that is a little long for
> this format. Maybe I can put them up on a basi
On 05/06/10 14:40, Daneel Yaitskov wrote:
> Hi,
>
>
>
> Everybody knows class's __str__ and __repr__ can be used to get readable
> user representation of an object.
>
>
> But for simple classes or debug aims it is tediously to code these
> methods. And Python has very powerful reflection. I be
501 - 600 of 788 matches
Mail list logo