Jorgen Grahn a écrit :
> On Thu, 12 Apr 2007 00:24:12 +0200, Bruno Desthuilliers <[EMAIL PROTECTED]>
> wrote:
>
>>Chris Lasher a écrit :
>>
>>>Should a Python module not intended to be executed have shebang/
>>>hashbang (e.g., "#!/usr/bin/env py
Alan G Isaac a écrit :
> Pardon the vocab question;
> I'm not a computer science type.
> According to the Reference Manual,
> a class defintion has the structure::
>
> classdef ::= "class" classname [inheritance] ":" suite
>
> What is the entire part before the suite called?
A statemen
Carl K a écrit :
> Is there a more elegant way of coding this:
>
> x=o.p # save .p
> o.p=0
> o.m()
> o.p=x # restore .p
>
> seems very push/pop to me - like there should be a way that doesn't need
> a var (x) or the save/set lines should be done in one command.
>
> (personally I think .m woul
Jack a écrit :
> I wonder what everybody uses for Python editor/IDE on Linux?
Strange as it might be, not everybody's using the same editor.
> I use PyScripter on Windows, which is very good. Not sure if
> there's something handy like that on Linux.
Oh yes ? Why so ?
The best code editor ever i
7stud a écrit :
> Jack wrote:
>
>>I wonder what everybody uses for Python editor/IDE on Linux?
>>I use PyScripter on Windows, which is very good. Not sure if
>>there's something handy like that on Linux. I need to do some
>>development work on Linux and the distro I am using is Xubuntu.
>
>
> Ev
pierre-yves guido a écrit :
> hello (I hope my english is not so bad),
De ce point de vue là, ça peut aller...
> I'm doing a training course and I'm a newbie in Python. My problem :
> I have a form,
HTML form ? GUI form ? In both cases, using which
environment/libs/framework ?
> and when I cl
John Salerno a écrit :
> Setting aside, for the moment, the utility of this method or even if
> there's a better way, I'm wondering if this is an efficient way to do
> it. I admit, there was some copying and pasting, which is what prompts
> me to ask the question. Here's the method. (I hope it l
Steven Bethard a écrit :
> Bruno Desthuilliers wrote:
>
>> Alan G Isaac a écrit :
>>
>>> Pardon the vocab question;
>>> I'm not a computer science type.
>>> According to the Reference Manual,
>>> a class defintion has the structure::
&g
Greg Donald a écrit :
> On 4/13/07, Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
>
>> Except for real programmers...
>
> That's correct. We use:
>
> # dd if=/dev/tty of=/dev/hda1
>
> and such.
>
Hear hear !-)
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers a écrit :
> pierre-yves guido a écrit :
>
>> hello (I hope my english is not so bad),
>
>
> De ce point de vue là, ça peut aller...
>
Oh, yes, while we're at it, I forgot to mention: there's also a french
Python newsgroup, fr.comp.l
Jia Lu a e'crit :
> Hello all
>
> I donot want to use a real DB like MySQL ...
Whether MySQL is qualifies as a "real DB" is still an open question. But
you can use SQLite, which is an embedded SQL database.
--
http://mail.python.org/mailman/listinfo/python-list
Ali a écrit :
> On 14 Apr, 05:48, "Jack" <[EMAIL PROTECTED]> wrote:
>
>>That's a good one. I got to find out what's special with Emacs :)
>
>
> The users.
>
+10 OT-QOTW !-)
(ouch, it hurts...)
--
http://mail.python.org/mailman/listinfo/python-list
matthewperpick a écrit :
> Check out this toy example that demonstrates some "strange" behaviour
> with keyword arguments and inheritance.
Nope. It demonstrates that default arguments are eval'd only once (when
the def statement is eval'd), which is documented and a FAQ.
> I have a
> very rudime
Bjoern Schliessmann a écrit :
> Bruno Desthuilliers wrote:
>> Bjoern Schliessmann a écrit :
>
>>> Why don't you make a preprocessor which accepts method
>>> declarations without "self" and fixes them?
>> The problem being that there's no suc
james_027 a écrit :
> hi,
>
> How could I transform something like this
>
> dict_1 = {'customer_id':1, 'item_id':3, amount:100}
>
> into
>
> dict_2 = {'customer':1, 'item':3, amount:100}
dict_2 = dict((k[:-3], v) for k, v in dict_1.iteritems())
--
http://mail.python.org/mailman/listinfo/pytho
Zentrader a écrit :
> This would accept ints, floats, and decimal types.
It doesn't...
> import decimal
Useless
> class Nint(int):
> def __add__(self, x, y):
The prototype for __add__ is __add__(self, other)
> try:
> return x+y
> except:
> return No
Mark Morss a écrit :
> I would like to construct a class that includes both the integers and
> None. I desire that if x and y are elements of this class, and both
> are integers, then arithmetic operations between them, such as x+y,
> return the same result as integer addition. However if either
John Roth a écrit :
> On Sep 12, 11:35 am, TheFlyingDutchman <[EMAIL PROTECTED]> wrote:
>
>>On Sep 12, 4:40 am, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote:
>>
>>>Ivan Voras wrote:
>>>
What does "self" have to do with an object model? It's an
function/method argument that might as well b
Erik Jones a écrit :
> On Sep 14, 2007, at 11:54 PM, David Trudgett wrote:
>
>> TheFlyingDutchman <[EMAIL PROTECTED]> writes:
>>
(snip)
>>
>> Several languages use the "object.method(args)" form, which is syntactic
>> sugar for "method(object, other_args)" which Ada, for instance, uses.
>> Knowi
TheFlyingDutchman a écrit :
>>
>>
>> Hi, I'm new to Python, I don't even fully know the language, never done
>> a full project in Python. What's more, probably I'll never will.
>> But that's not the point, the point is I want YOU people to modify the
>> language you know in and out, the program wi
TheFlyingDutchman a écrit :
>
> If you wanna know why the Renault Dauphine requires the driver to pull
> down on the rearview mirror in order to shift into reverse you simply
> need to open the hood and remove the engine and disassemble the
> transmission and you will see that it has no way of dis
duikboot a écrit :
> Hello,
>
> I am trying to extract a list of strings from a text. I am looking it
> for hours now, googling didn't help either.
> Could you please help me?
>
s = """
\n\n28996\n\n\n28997\n"""
regex = re.compile(r'', re.S)
L = regex.findall(s)
print L
danfolkes a écrit :
(top post corrected - Daniel, please, avoid top-posting...)
> On Sep 17, 7:14 am, python_lover <[EMAIL PROTECTED]> wrote:
>> HI,
>>
>> Please help how to execute a py file with xitami.
>>
>> I installed xitami , downloaded lrwp file.
>>
>> accessing the first web application pro
Stodge a écrit :
> I'm trying to do the following. I have a Python application that is
> run:
>
> python app1.py --location=c:\test1
>
> What I want to do is save the location parameter, so I can then do (in
> the same window):
>
> python app2.py
>
> And have app2.py automatically have access t
Grant Edwards a écrit :
> On 2007-09-17, Laurent Pointal <[EMAIL PROTECTED]> wrote:
>
>> Note3: Its funny to see how Python users tries to change the language,
>> does this occure with C, C++, Java, C# ?
>
> Yes. I remember somebody I worked with once who write a C
> program using a whole pile
Laurent Pointal a écrit :
(snip)
> Note3: Its funny to see how Python users tries to change the language,
s/Python users/some new Python users/, IMHO.
--
http://mail.python.org/mailman/listinfo/python-list
TheFlyingDutchman a écrit :
> On Sep 17, 4:02 am, Steve Holden <[EMAIL PROTECTED]> wrote:
(snip)
> I made a complaint about a small design choice.
It's by no mean a "small" design choice.
> I also made it in the
> past tense at least once ("should have done it") and explicitly
> expressed that I
Nathan Harmston a écrit :
> HI,
>
> I m trying to start an api in a similar way to the djangic way of
> Class.objects.all(). Ie objects is a "Manager" class.
>
> So:
>
> class Foo(object):
>def __init__(self):
> self.test = "NEE"
>
> class Manager(object):
> def __init__(self):
Lorenzo Stella a écrit :
> Hi all,
> I haven't experienced functional programming very much, but now I'm
> trying to learn Haskell and I've learned that: 1) in functional
> programming LISTS are fundmental;
Not exactly. They are used quite a lot, yes, but that's also the case in
other paradigms.
Aahz a écrit :
> In article <[EMAIL PROTECTED]>,
> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>> But what, given that I'm an AOL user still thinking it's kewl to hide
>> behind a pseudo, what else would you expect ?
>
> What exactly is a "
Nathan Harmston a écrit :
> Hi,
>
> I guess my description was a bit rubbish in retrospec, I dont even
> think the title of my email made senseit doesnt to me now:
>
> class Manager(object):
> def __init__(self):
> pass
> def dosomething(self):
> return "RESULTS"
>
> class Foo(ob
exhuma.twn a écrit :
> This is something that keeps confusing me. If you read examples of
> code on the web, you keep on seeing these three calls (super, apply
> and __init__) to reference the super-class. This looks to me as it is
> somehow personal preference. But this would conflict with the "Th
Kay Schluehr a écrit :
> On 18 Sep., 10:13, Bruno Desthuilliers [EMAIL PROTECTED]> wrote:
>> Lorenzo Stella a écrit :
>>
>>> Hi all,
>>> I haven't experienced functional programming very much, but now I'm
>>> trying to learn Haskell and I&
Ben Finney a écrit :
> Evan Klitzke <[EMAIL PROTECTED]> writes:
>
>> On Tue, 2007-09-18 at 14:15 +1000, Ben Finney wrote:
>>> Why does the documentation of 'super' say that it returns the
>>> superclass when *that's not true*? It doesn't return the
>>> superclass, it returns the next class in the
Christoph Scheit a écrit :
> On Tuesday 18 September 2007 15:10, Marc 'BlackJack' Rintsch wrote:
>> On Tue, 18 Sep 2007 14:06:22 +0200, Christoph Scheit wrote:
>>> Then the data is added to a table, which I use for the actual
>>> Post-Processing. The table is actually a Class with several "Columns"
Stodge a écrit :
> os.path.expanduser isn't an option; I need each console/window to
> maintain different values which I wouldn't get from saving to a user's
> home directory. Unless I used a different file for each console/window
> but that just gets me into the same situation I'm already in. I th
Aahz a écrit :
> In article <[EMAIL PROTECTED]>,
> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>> Aahz a écrit :
>>> In article <[EMAIL PROTECTED]>,
>>> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>>>> But what, given th
Aahz a écrit :
> In article <[EMAIL PROTECTED]>,
> Steve Holden <[EMAIL PROTECTED]> wrote:
>> Aahz wrote:
>>> In article <[EMAIL PROTECTED]>,
>>> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>>>> Aahz a écrit :
>>>>
[EMAIL PROTECTED] a écrit :
> On Sep 18, 1:31 pm, "Shawn Milochik" <[EMAIL PROTECTED]> wrote:
>
>>On 9/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>>
>>>If I have a file name: AVC1030708.14. How do I strip out certain
>>>characters from the file name? I am so used to using MID, LEFT,
walterbyrd a écrit :
> I understand that Python has them, but PHP doesn't.
Really ?
> I think that is because mod_php is built into apache, but mod_python
> is not usually in apache.
Language etc aside, what the difference between mod_php and mod_python
(or mod_whatever) from apache's POV ?
>
Grant Edwards a écrit :
> On 2007-09-18, Steve Holden <[EMAIL PROTECTED]> wrote:
>
>>Lorenzo Stella wrote:
>>[...]
>>
>>>My question is: how can we call a language "functional" if
>>>it's major implementation has a limited stack? Or is my code
>>>wrong?
>>
>>So, which environment do you habitually
Ricardo Aráoz a écrit :
> That is self.__attributes
>
> Been reading about the reasons to introduce them and am a little
> concerned. As far as I understand it if you have a class that inherits
> from two other classes which have both the same name for an attribute
> then you will have a name clas
Ben Finney a écrit :
> Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
>
>> Ben Finney a écrit :
>>> Evan Klitzke <[EMAIL PROTECTED]> writes:
>>>> On Tue, 2007-09-18 at 14:15 +1000, Ben Finney wrote:
>>>>> [the 'super' funct
Michele Simionato a écrit :
> On Sep 19, 12:36 pm, Bruno Desthuilliers [EMAIL PROTECTED]> wrote:
>
>> The next class in the MRO *is* a superclass of the *instance*. Else it
>> wouldn't be in the MRO !-)
>
> Bruno, there is no such a thing as a superclass in
[EMAIL PROTECTED] a écrit :
> hi all,
> I need to create a Python list of lambda-funcs that are dependent on
> the number of the ones, for example
>
> F = []
> for i in xrange(N):
> F.append(lambda x: x + i)
>
> however, the example don't work - since i in end is N-1 it yields x+
> (N-1) for
[EMAIL PROTECTED] a écrit :
> Hi everybody! Is there anything out there that can validate and parse
> some "onyx-style" xml?
I don't know what's "onyx-style" xml, but if it's xml, any xml parser
will parse it, and any validating parser should be able to validate it
given the correct DTD.
--
htt
A.T.Hofkamp a écrit :
> Hello all,
>
> This morning I tried to create my own read-only dictionary, and failed
> miserably.
> I don't understand why, can somebody enlighten me?
>
> Below is a brute-force experiment that cannot deal with "x in obj", plz read
> the explanation below the code:
>
Steve Holden a écrit :
> A.T.Hofkamp wrote:
>
(snip)
>> So if copying all methods of a native dictionary is not enough, what
>> should I
>> do to make my class work as a dictionary WITHOUT deriving from dict
>> (which will
>> obviously work).
>>
> You have to overwrite the "__new__" method to r
Bruno Desthuilliers a écrit :
> A.T.Hofkamp a écrit :
>
(snip)
>> # Below is produced with
>> # print '\n'.join(['self.%s = self.mydict.%s' % (v,v)
>> # for v in dir(dict)])
>> # commented-out func
A.T.Hofkamp a écrit :
> Hello all,
>
> This morning I tried to create my own read-only dictionary, and failed
> miserably.
> I don't understand why, can somebody enlighten me?
>
(snip)
> So if copying all methods of a native dictionary is not enough, what should I
> do to make my class work as a
Aahz a écrit :
> In article <[EMAIL PROTECTED]>,
> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>
(snip)
>>>>>(For those joining only recently, my full legal name is "Aahz", which I
>>>>>changed from my former name precisely becau
Stéphane Larouche a écrit :
(snip)
>
> funcs = [(lambda i: lambda x: x+i)(i) for i in xrange(10)]
A bit more complex than necessary... The canonical solution is
funcs = [lambda x, i=i: x+i for i in xrange(10)]
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
(top-post corrected)
> On 20 Set, 12:01, [EMAIL PROTECTED] wrote:
>> On 19 Set, 21:02, Bruno Desthuilliers
>>
>> <[EMAIL PROTECTED]> wrote:
>>
>>> I don't know what's "onyx-style" xml,
>> i'
TheFlyingDutchman a écrit :
(snip)
> I am confused about the benefits/disadvantages of the "GIL removal".
> Is it correct that the GIL is preventing CPython from having threads?
>
> Is it correct that the only issue with the GIL is the prevention of
> being able to do multi-threading?
http://doc
[EMAIL PROTECTED] a écrit :
> If I wanted to accomplish looking up values from one table based on a
> value from another table or file, how would I go about doing this in
> Python? Would I build a dictionary or an array?
>
> exp:
>
> Table1:
>
> Site = 103
> Lane = 2
> Dir = ? # Get this from
W. Watson a écrit :
> Is there an editor that allows one to position to put the cursor and
> then by pushing some button goes to the end of the def?
Emacs. And you don't even have to "push some button" (just remember the
correct key sequence !-)
--
http://mail.python.org/mailman/listinfo/python
[EMAIL PROTECTED] a écrit :
> On Sep 20, 10:34 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] a écrit :
(snip)
>>> Normally in Access I would just use a Dlookup and be done with it, or
>>> use a Recordset in VB. Thanks guys.
>> What
Ben Finney a écrit :
(snip)
> One common response to that is "Processes are expensive on Win32". My
> response to that is that if you're programming on Win32 and expecting
> the application to scale well, you already have problems that must
> first be addressed that are far more fundamental than th
Robin Becker a écrit :
> John J. Lee wrote:
>
>> Robin Becker <[EMAIL PROTECTED]> writes:
>>
>>> I see a folder .python-eggs in my home directory on one of our servers
>>> with various .so files
>>>
>>> ~/.python-eggs/MySQL_python-1.2.2-py2.3-freebsd-6.1-SECURITY-i386.egg-tmp/_mysql.so
>>>
>>>
>
[EMAIL PROTECTED] a écrit :
(snip)
>
> If I flipped the Table being looked up not to repeat, would that make
> things easier to look up a value in?
Don't repeat informations.
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney a écrit :
> "W. Watson" <[EMAIL PROTECTED]> writes:
>
>> Is vim just an editor or is it capable of running and debugging a
>> program, as well?
>
> (Please don't top-post. Instead, reply below each point to which
> you're responding, removing quoted text irrelevant to your response.)
>
W. Watson a écrit :
> How about in the case of MS Win?
>
> Ben Finney wrote:
>>
>> (Please don't top-post. Instead, reply below each point to which
>> you're responding, removing quoted text irrelevant to your response.)
>>
Wayne, may I second Ben on his suggestion to stop top-posting ?
--
http:
Norm a écrit :
> Hi,
>
> without meaning to start a flame war between the various python web
> tools, I was wondering if anyone had a review of the status of Zope.
> For example, is it being used for new projects or just maintenance?
>
> I really like the look of Zope 3, and the interface/schema
Konstantinos Pachopoulos a écrit :
> Hi,
> i have the following class:
> ===
> class CmterIDCmts:
def __init__(self,commiterID,commits):
>self.commiterID_=long(commiterID)
>self.commits_=long(commits)
>
>def __str__(self)
Ron Adam a écrit :
>
>
> TheFlyingDutchman wrote:
>
>> I am not talking about the way it does it, but rather, the way it
>> could do it or... could have done it. That requires no knowledge of
>> how the interpreter currently does it unless I am proposing something
>> that no interpreter in the w
Robin Becker a écrit :
> Bruno Desthuilliers wrote:
>> Robin Becker a écrit :
>>> John J. Lee wrote:
>>>
>>>> Robin Becker <[EMAIL PROTECTED]> writes:
>>>>
>>>>> I see a folder .python-eggs in my home directory on on
Robin Becker a écrit :
> Bruno Desthuilliers wrote:
>
>>> >>>
>>>
>>> it would seem simpler to have the .so files inside the site-packages
>>> and there's the question of why this folder has to be obfuscated
>>> (na
Cristian a écrit :
(snip)
> To me, the biggest setback for new programmers is the different syntax
> Python has for creating functions. Instead of the common (and easy to
> grasp) syntax of foo = bar
It's actually a mostly *un*common syntax when it comes to functions. The
only "mainstream" langua
Kay Schluehr a écrit :
(snip)
>
> I checked out Io once and I disliked it. I expected Io's prototype OO
> being just a more flexible variant of class based OO but Io couples a
> prototype very closely to its offspring. When A produces B and A.f is
> modified after production of B also B.f is modif
Kay Schluehr a écrit :
> On 22 Sep., 23:17, Erik Max Francis <[EMAIL PROTECTED]> wrote:
>
>
>>The attribute and method (not made distinct in Io; they're called
>>"slots") is much the same as with Python; the current instance is
>>checked for the object, then its parents, then _its_ parents, and s
Cristian a écrit :
> On Sep 21, 4:47 pm, "Sean Tierney" <[EMAIL PROTECTED]> wrote:
>
>>Just tell him that "functions are like all other variables and can
>>therefore be passed by other functions or returned by other functions.
>>"
>>
>
>
>
>
> I could """Just tell him that "functions are like
Cristian a écrit :
> On Sep 21, 5:21 pm, Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
>
>> Ok, then what about classes ? They also are objects-like-any-other,
>> after all. So should we have this syntax too ?
>>
>> MyClass = class(ParentClass)
Mikael Olofsson a écrit :
> Bruno Desthuilliers wrote:
>> def __str__(self):
>> return "<%s:%s>" % (self.commiterID_, self.commits_)
>
> I would write that in the following way:
>
> def __str__(self):
>return "<%(commiterID_)s:%(com
Steven D'Aprano a écrit :
> On Fri, 21 Sep 2007 22:07:55 +, Cristian wrote:
>
>> True, there is lambda, but that is very limited. It might be useful for
>> key arguments, but not much else.
>
> No, lambda is useful for anything that any other function is useful for,
> provided that you can w
Matthew Woodcraft a écrit :
> Cristian <[EMAIL PROTECTED]> wrote:
>> To me, the biggest setback for new programmers is the different
>> syntax Python has for creating functions. Instead of the common (and
>> easy to grasp) syntax of foo = bar Python has the def foo(): syntax.
>
> [...]
>
>> in a
[EMAIL PROTECTED] a écrit :
> hi,
>
> I have the following list -
>
> ["1", "11", "2", "22"]
>
> how do I sort it like this -
>
> ["1", "2", "11", "22"]
source = ["1", "11", "2", "22"]
result = [t[1] for t in sorted((int(item), item) for item in source)]
print result
--
http://mail.python.or
BJ Dierkes a écrit :
> Hello all,
>
> I am looking for opinions on preferred methods of Database Abstraction
> Layer or Object Relation Mapper (I'm using Python 2.5). I have found a
> number of options such as those listed here:
>
> http://wiki.python.org/moin/HigherLevelDatabaseProgramming
>
David a écrit :
>> I would like to know if "Pickling" the class object is the only way of
>> writing it to disk for persistent storage. Also, do we have a concept
>> similar to "array of objects" in Python? The number of objects is only
>> known at "run-time".
>
> Have a look at YAML.
>
> http://
W. Watson a écrit :
(top-post corrected)
> Bruno Desthuilliers wrote:
>> W. Watson a écrit :
>>> How about in the case of MS Win?
>>>
>>> Ben Finney wrote:
>>>>
>>>> (Please don't top-post. Instead, reply below each point to whic
NickC a écrit :
> On Sep 24, 9:16 pm, Bruno Desthuilliers [EMAIL PROTECTED]> wrote:
>> Matthew Woodcraft a écrit :
>>> One reason for the different syntax is that functions, unlike most
>>> other objects, know their own names (which can be shown in tracebacks
>>
Ratko a écrit :
> Hi all,
>
> I was wondering if something like this is possible. Can a base class
> somehow know if a certain method has been overridden by the subclass?
If your use case is to make sure a given ('abstract') method has been
overriden, the canonical solution is to raise NotImplem
Ratko a écrit :
>> If your use case is to make sure a given ('abstract') method has been
>> overriden, the canonical solution is to raise NotImplementedError in the
>> base class's implementation
>
> I am not really interested in forcing the subclass to implement a
> method. I am interested in kno
[EMAIL PROTECTED] a écrit :
(snip)
> My actual code has different variables, but thanks for pointing that
> out. I'm so used to coding in VB, where indenting isn't a problem, so
> all this indenting is new to me how Python wants it dictated.
statement:
block line 1
block line 2
# end state
Ratko a écrit :
> bruno a écrit
>>Another solution is to compare the functions wrapped by the methods:
>>
>>class EvtHandler:
>> def __init__(self):
>> onKey = getattr(self, 'onKey')
>> if onKey.im_func is EvtHandler.onKey.im_func:
s/is/is not/, of course
>> regi
HYRY a écrit :
>> No. a.append is a "bound method" - a method that already has an
>> associated instance, that will be provided as the first argument to the
>> method call. Bound methods are created "on the fly".
>>
>
> Does this means there is no method to get the original methods from
> the Boun
Egon Frerich a écrit :
> Zope 3 uses Twisted
Chapter and verse ???
--
http://mail.python.org/mailman/listinfo/python-list
HYRY a écrit :
>> There's no such thing as an "original method" - what's stored as an
>> attribute of the class is a plain function. FWIW, you can get at this
>> function quite easily - via the im_func attribute of the method.
>
> I know about im_func, but I tried the im_func attribute of append a
[EMAIL PROTECTED] a écrit :
> How do I delete or remove values from a list
del
> or string
You can't. Python's strings are immutables.
> using the
> index.
>
> If a = [1,2,3,4,5,6,7,8] and I want to get rid of 1 -5, how would I do
> that?
del a[0:5]
print a
--
http://mail.python.org/mailman
Joe Goldthwaite a écrit :
> Hi everyone,
>
> I'm a developer who's been using python for a couple of years. I wrote a
> fairly large application using it but I was learning the language at the
> same time so it most of the code kind of sucks.
>
> I've learned a lot since then and I've been going
Matthew Wilson a écrit :
> I wrote some code to create a user and update a user on a remote box by
> sending emails to that remote box. When I was done, I realized that my
> create_user function and my update_user function were effectively
> identical except for different docstrings and a single d
Henrik Lied a écrit :
> Hi there!
>
> I'm using a recipe found on ASPN [1] to upload some data to an
> external server.
>
> The request fails, and all I get in response is "No backend servers
> available".
>
> So I'm wondering: Is this a known exception-message in httplib,
If it was, you should
[EMAIL PROTECTED] a écrit :
> I tried writing a true and false If statement and didn't get
> anything? I read some previous posts, but I must be missing
> something. I just tried something easy:
>
> a = ["a", "b", "c", "d", "e", "f"]
>
> if "c" in a == True:
> Print "Yes"
>
> When I run t
Neil Cerutti a écrit :
(snip)
>
> Vim has Python integration if you want to control it with Python
> scripts. Cool! Of course, Vim needs such a capability more than
> Emacs, which has the very cool elisp scripting language.
FWIW, emacs is programmable in Python too IIRC.
--
http://mail.python.or
[EMAIL PROTECTED] a écrit :
> I have a pretty simple XMLRPCServer, something along the lines of the
> example:
>
> server = SimpleXMLRPCServer(("localhost", 8000))
> server.register_function(pow)
> server.register_function(lambda x,y: x+y, 'add')
> server.serve_forever()
>
> Now what I want to do
Shawn Minisall a écrit :
> Fredrik Lundh wrote:
>
>> Shawn Minisall wrote:
>>
>>
>>
>>> Sorry, it looks like it's on the fourth line with the 3 values on
>>> line 4...its reading line 3 fine
>>>
>>> Traceback (most recent call last):
>>> File "", line 1, in
>>> main()
>>> File "I:\COMP
J. Clifford Dyer a écrit :
> On Thu, Sep 27, 2007 at 09:50:26PM +0200, Bruno Desthuilliers wrote
> regarding Re: ValueError: too many values to unpack,>>>:
>> Shawn Minisall a ?crit :
(snip)
>>> I did and it printed everything up until the 3rd line with 3
>>&
er
order functions. So to understand decorators, you first need understand
the concepts of higher order functions and closures. Both are documented
in many places on the web.
> Bruno Desthuilliers wrote:
>
>> IOW, direct access to obj.__class__.__dict__ bypasses both inheritence
[EMAIL PROTECTED] a écrit :
> If I have a text file that is delimited by spaces,
spaces or tabs ?
> how do I import it
> and get to comma delimited? Here is a row of data from the text file:
>
> 1110:55:14 265 8.5
> 1.4+1.1 2.5 Class-2 0
> I tried
Byung-Hee HWANG a écrit :
> Hi there,
>
> What is different between Ruby and Python?
Not much - both are hi-level dynamic object oriented languages with some
functional aspects - and quite a lot (their respective object models are
totally different).
Also, Python, being somewhat older, has pe
Googy a écrit :
> I am new to python...
>
> The programming language i know well is C
> Can any one recommend me the good ebook for beginners. I have loads of
> ebooks but i am not able to decide which to start with which book.
> Also i am learning XML so later on i can switch to books on Python a
1501 - 1600 of 3705 matches
Mail list logo