Jeremy Sanders wrote:
> Is it possible to implement some sort of "lazy" creation of objects only
> when the object is used, but behaving in the same way as the object?
Smells like a Proxy pattern...
> For instance:
>
> class Foo:
> def __init__(self, val):
> """This is really slow."""
>
Jeremy Sanders wrote:
> Diez B. Roggisch wrote:
>
>
>>It works - in python 2.4!! I tried subclassing dict, but my
>>__getitem__-method wasn't called - most probably because it's a C-type,
>>but I don't know for sure. Maybe someone can elaborate on that?
>
>
> Yes - I tried that (see thread belo
Peter Otten wrote:
> Bruno Desthuilliers wrote:
>
>
>>2/ functional solution:
>>---
>>def make_funcs():
>>x = 0
>>def _abc():
>>x = 1
>>return x + 1
>>def _abcd():
>>return x + 1
>>return _abc, _abcd
>>
>>abc, abcd = make_funcs()
>>print
Lasse Vågsæther Karlsen wrote:
> I am slowly learning Python and I'm already starting to write some minor
> modules for myself. Undoubtedly there are better modules available
> either built-in or 3rd party that do the same as mine and much more but
> I need to learn it one way or another anyway.
>
Markus Wankus wrote:
> Hi All,
>
> Does anyone know of any good Zope3 examples?
Ask the Zope mailing-list. Zope is a world by itself, and is usually not
discussed here.
BTW, Zope3 is a really really new thing, so you won't find much existing
apps. When it's said that it offers 'the best from P
James A. Donald wrote:
> I am contemplating getting into Python, which is used by engineers I
> admire - google and Bram Cohen, but was horrified
"horrified" ???
Ok, so I'll give you more reasons to be 'horrified':
- no private/protected/public access restriction - it's just a matter of
conventi
James A. Donald wrote:
> James A. Donald:
>
>> > Surely that means that if I misspell a variable name, my program will
>> > mysteriously fail to work with no error message.
>
>
> On Sun, 02 Oct 2005 17:11:13 -0400, Jean-François Doyon
>
>>No, the error message will be pretty clear actually :)
[EMAIL PROTECTED] wrote:
> The easiest way to avoid this problem (besides watching for NameError
> exceptions) is to use an editor that has automatic name completion.
> Eric3 is a good example. So, even though in theory it could be an
> issue, I rarely run into this in practice.
I don't use emacs
Paul Rubin wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>
>>No, but that is precisely why Python's semi-private variables are
>>usually better. Names like _X and class.__X are warnings to the developer
>>"use these at your own risk", without preventing developers who need them
>>from using
Mike Meyer wrote:
(snip)
> Antoon, at a guess I'd say that Python is the first time you've
> encountered a dynamnic language. Being "horrified" at not having
> variable declarations,
Mike, "being horrified" by the (perceived as...) lack of variable
declaration was the OP's reaction, not Antoon's.
CppNewB wrote:
> I am absolutely loving my experience with Python. Even vs. Ruby, the syntax
> feels very clean with an emphasis on simplification.
>
> My only complaint is that there doesn't appear to be a great commercial IDE
Why "commercial" ?
--
bruno desthuilliers
python -c "print '@'.j
[EMAIL PROTECTED] wrote:
> Sorry Fredrik but I don't understand. Just comment out the assert and
> you have different results depending on whether an unrelated sort
> function is defined.
> This seems weird to me !
code snippet:
> from random import choice
> class OBJ:
> def __init__(self,i
Alex Stapleton wrote:
>
> On 9 Oct 2005, at 19:04, Bruno Desthuilliers wrote:
>
>
>> Laszlo Zsolt Nagy a écrit :
(snip)
>>> Do you want to know how many internal string operations are done inside
>>> the Python interpreter? I believe it is not a useful information. There
>>> are benchmarks tes
Donn Cave wrote:
> Quoth "Fredrik Lundh" <[EMAIL PROTECTED]>:
> | Alex Stapleton wrote
> |
> | > Except it is interpreted.
> |
> | except that it isn't. Python source code is compiled to byte code, which
> | is then executed by a virtual machine. if the byte code for a module is up
> | to date, t
Laszlo Zsolt Nagy wrote:
> I have a program with this code fragment:
>
>print len(data)
>print data[:50]
>raise SystemExit
>
> This prints:
>
> 20381
>
> But if I change 50 to 51
>
>print len(data)
>print data[:51]
>raise SystemExit
>
> then it prints
>
> 20381
> !DO
James Gan wrote:
> I want the object printed in a readable format. For example,
> x =[a, b, c, [d e]] will be printed as:
> x--a
> |_b
> |_c
> |___d
>|_e
>
> I tried pickled, marshel. They do different work.
>
> Is there another
> module which do this kind of job?
>
pprint
--
bruno des
Johnny Lee wrote:
> Class A:
s/C/c/
>def __init__(self):
> self.member = 1
>
>def getMember(self):
> return self.member
>
> a = A()
>
> So, is there any difference between a.member and a.getMember?
yes : a.member is an integer, a.getMember is a bound method. You could
hav
[EMAIL PROTECTED] wrote:
> If you change it to this it works. You should provide a get and a set
> function for a property.
The OP did:
-> command=property(getCommand, setNothing)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PRO
Chris Lasher wrote:
> Hello,
> Is there a Python-sensitive, Linux compatible IDE out there with
> standard bells and whistles (source browser, symbolic debugger, etc.)
> but with the action-per-keystroke editing capabilities of Vim? I have
> failed to turn up such an IDE in my Googling and IDE pr
Robin Becker wrote:
> Bruno Desthuilliers wrote:
>
>> Robin Becker a écrit :
>>
>>> Is there a way to override a data property in the instance? Do I need
>>> to create another class with the property changed?
>>
>>
>>
>> Do you mean attributes or properties ?
>
>
> I mean property here.
Ok, was
Bryan wrote:
> Amol Vaidya wrote:
>
>> Hi. I am interested in learning a new programming language, and have
>> been debating whether to learn Ruby or Python.
(snip)
>
> why don't you do what i did? download ruby and spend a day or two
> reading "programming ruby" from www.ruby-lang.org/en. the
Amol Vaidya wrote:
> Hi. I am interested in learning a new programming language, and have been
> debating whether to learn Ruby or Python. How do these compare and contrast
> with one another, and what advantages does one language provide over the
> other? I would like to consider as many opinio
Tom Anderson wrote:
> On Thu, 20 Oct 2005, Diez B. Roggisch wrote:
>
>> So - _I_ think the better user-experience comes froma well-working
>> easy to use REPL to quickly give the scripts a try.
>
>
> I'd agree with that. Which is better, a difficult language with lots of
> fancy tools to help yo
Amol Vaidya wrote:
> "Casey Hawthorne" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>What languages do you know already?
>>
>>What computer science concepts do you know?
>>
>>What computer programming concepts do you know?
>>
>>
>>Have you heard of Scheme?
>>
>>
>>Ruby is a bi
Michael Ekstrand wrote:
> On Friday 21 October 2005 07:07, bruno modulix wrote:
>
>>>>Python is more like Java.
>>
>>
>>Err... Python is more like what Java would have been if Java was a
>>smart dynamic hi-level object oriented language !-)
>>
&g
Scott David Daniels wrote:
> bruno modulix wrote:
>
>> ... Another language that failed to make it to the mainstream but is
>> worth giving a try is Smalltalk - the father of OOPLs (Simula being the
>> GrandFather).
>
> I would say Simula is the forefather of
Alex Martelli wrote:
(snip)
> Here's a tiny script showing some similarities and differences:
>
> def f()
> i = 0
> while i < 100
> j = 923567 + i
> i += 1
> end
> end
>
> f()
>
> comment out the 'end' statements, and at colons
s/at/add/
> at the end of the def
> and while st
[EMAIL PROTECTED] wrote:
> I don't know if this is the appropriate place to post a Zope question
Nope. You'd better use the zope mailing-list for this.
> but I figure many here are familiar with it. I'm confused about the
> role of the ZMI when it comes to development.
As it's name implies, the
PyPK wrote:
> hmm Thats one thing. Also I was thinking of something like benefites of
> python over other languages.
That's fairly context-dependant *and* subjective.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@
Ask wrote:
> G'day All,
>
(snip)
Welcome here...
> I must admit to much confusion regarding some of the basics, but I'm sure
> time, reading, and good advice will get rid of that. at this stage, it's
> just working through some examples and getting my head around things. As an
> example, if I
Scott David Daniels wrote:
> bruno modulix wrote:
>
>> Scott David Daniels wrote:
>>
>>> bruno modulix wrote:
>>>
>>>> ... Another language that failed to make it to the mainstream but is
>>>> worth giving a try is Smalltalk - the fat
beza1e1 wrote:
> let me try.
>
> 1) ''.join(lots_of_pieces)
>
> 2) This doesn't even work, if something is removed, the list is too
> short. So:
> [x for x in somelist if not isbad(x)]
> well, list comprehension is Python 2.4
2.2.x IIRC
> and 2.3 is the standard in many
> OSes, so it is possib
[EMAIL PROTECTED] wrote:
> Hi Matt,
> I also am almost a newbie (in Python) and my approach to variable
> naming
> follows more or less the Hungarian Type Notation Defined.
which is seen as a bad practice anywhere outside Win32...
http://mindprod.com/jgloss/unmainnaming.html
--
bruno desthuill
Thys Meintjes wrote:
> Greets,
>
> I have need of a Delphi/pascal to python converter. Googling didn't
> suggest any obvious leads so I'm trying here...
Have you tried with "python/delphi programer" ?-)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')])
[EMAIL PROTECTED] wrote:
> ##Coin Flip: randomly flips 100 "coins" and prints results
> ##Original draft: june 27, 2005
> ##Chuck
>
> import random
> heads = 0
> tails = 0
> flips = 0
> while flips < 99:
> coin = random.randrange(0, 2)
> if coin == 0:
> heads = heads +
Odd-R. wrote:
> I have a dictionary, and I want to convert it to a tuple,
> that is, I want each key - value pair in the dictionary
> to be a tuple in a tuple.
>
> If this is the dictionary {1:'one',2:'two',3:'three'},
> then I want this to be the resulting tuple:
> ((1,'one'),(2,'two'),(3,'three'
George Sakkis wrote:
> I'd love to see IPython replace the standard interpreter.
I dont.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
Tim Williams (gmail) wrote:
(snip)
d = {1:'one',2:'two',3:'three'}
t = tuple([(k,v) for k,v in d.iteritems()])
Err... don't you spot any useless code here ?-)
(tip: dict.items() already returns a list of (k,v) tuples...)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-
Erik Max Francis wrote:
> bruno modulix wrote:
>
>> Err... don't you spot any useless code here ?-)
>>
>> (tip: dict.items() already returns a list of (k,v) tuples...)
>
> But it doesn't return a tuple of them. Which is what the tuple call
> th
[EMAIL PROTECTED] wrote:
> Thanks to all who replied. I did not ask for other iterations of my
> program. I asked what was wrong with it.
Please understand that usenet is not a commercial support service.
Everyone is free to answer how he likes. Or not to answer at all...
--
bruno desthuilliers
praba kar wrote:
> Dear All,
>
> I am using python2.4 and Mysql 4.0.20. Now I am
> want to connect python and mysql. I have problem to
> install Mysql-python-1.2.0 interface into my machine.
> When I try to install this interface the following
> error restrict to install fully.
>
> /System
George Sakkis wrote:
>>"bruno modulix" <[EMAIL PROTECTED]> wrote:
>
>
>>George Sakkis wrote:
>>
>>>I'd love to see IPython replace the standard interpreter.
>>
>>I dont.
>
>
> Care to say why ?
Sorry...
it was about
Statesman wrote:
> In English:
>
> I don't know much about python and I won't have much time to learn much
> about it even if it seems powerful...
>
(snip code)
> Here is an error I get trying to run this script:
>
> AttributeError: 'string' object has no attribute 'index'
>
> According to me,
Statesman wrote in comp.lang.python:
Hi Statesman
comp.lang.python is the english-speaking Python forum. You may want to
try the french-speaking one at fr.comp.lang.python (xpost and fu2 set)
> Je connais mal python et n'est pas trop le temps de m'y plonger bien
> que cela semble être assez pui
Philipp H. Mohr wrote:
> Hello,
>
> I would like to store multiple dictionaries in a file, if possible one per
> line.
Why "one per line" ?
> My code currently produces a new dictionary every iteration and
> passes it on to another peace of code.
May this code rest in piece
> In order to be
[EMAIL PROTECTED] wrote:
> I am a java programmer
Too bad :(
> and I want to learn Python
So there's still hope !-)
> Please help me.
1/ download and install Python
2/ go thru the 'dive into Python' and 'Thinking in Python' free books
3/ post here when you're in doubt or in trouble...
And don'
Lad wrote:
> Hi,
> What is the best method for comparing two files by words?
try the difflib module:
http://www.python.org/doc/2.4.1/lib/module-difflib.html
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
anthonyberet wrote:
> My question isn't as all-encompassing as the subject would suggest...
>
> I am almost a Python newbie, but I have discovered that I don't get
> along with IDLE, as i can't work out how to run and rerun a routine
> without undue messing about.
>
> What I would really like is
Roy Smith wrote:
> bruno modulix <[EMAIL PROTECTED]> wrote:
>
>
>>Try Emacs + python-mode. Emacs surely has a lot of warts, but I'm still
>>looking for a better and more versatile code editor/IDE - specially when
>>it comes to languages with REPL (-> Read
Roland Heiber wrote:
> Vedanta Barooah wrote:
>
>> o = mother()
>> o.show()
>> y=mother.child()
>> y.increase(20)
>> # this should print 20
>> o.show()
>>
>> .. is it possible somehow ???
>
>
> Hi,
>
> this should do what you want:
>
> --- test.py
> class mother:
> x=0
> def __init
cantabile wrote:
> Hi,
>
> I'm trying to write a small installer for a server. But this program
> should be able to run in the future under heterogenous environments and
> os (at least linux/windows). I mean, the install will be done either in
> text mode or curses or gtk or tk, either in debian o
Throne Software wrote:
> Throne Software has opened up a Python Forum at:
>
> http://www.thronesoftware.com/forum/
>
> Join us!
>
Why should we ?
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://ma
Alex Dempsey wrote:
> Recently I tried to slice every element of a list of strings. First I tried:
>
> f = open("export.xls", "r")
http://www.python.org/doc/2.4.1/lib/module-csv.html
(snip, see other posts in this thread)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for
[EMAIL PROTECTED] wrote:
> Hey, I just started on Python and have a few questions I couldn't find
> answers to on the Python site or it's tutorial.
>
> 1. I notice a few "compiled python" files (indicated by reddish snake
> icons), I thought Python didn't need to be compiled? This is my first
> v
[EMAIL PROTECTED] wrote:
> All,
>
> Is there is a Plone type or product for generating a file list on a
> plone page, eg: a list of downloadable files in a table? An example of
> what I want can be found at
> http://www.zope.org/Members/MacGregor/ExtFile under "Available
> Releases" where a list
Jan Danielsson wrote:
> Hello all,
>
>How do I make a python script actually a _python_ in unix:ish
> environments?
>
> I know about adding:
> #!/bin/sh
>
>..as the first row in a shell script, but when I installed python on
> a NetBSD system, I didn't get a "python" executable; only a "
John Machin wrote:
> Dark Cowherd wrote:
>
>>> voiceless-ly'rs
>>
>>
>> What does this mean?? Just curious (googled that and ly'rs and didnt
>> find anything relevant)
s/ly'rs/ly y'rs/
> The voiceless part I understand to mean that Bruno is "shocked and
> stunned and not a little bit amazed" [1]
Paul D.Smith wrote:
> Can Python create a variable "on-the-fly". For example I would like
> something like...
>
> make_variable('OSCAR', 'the grouch');
> print OSCAR;
>
> ...to output...
>
> the grouch
>
> Anything like this in Python?
The bad news is that yes, there is something "like this"
Simon Dahlbacka wrote:
> If you actually want that kind of syntax, then why don't you use Visual
> Basic? ;)
s/VisualBasic/Ruby/
--
bruno desthuilliers
ruby -e "print '[EMAIL PROTECTED]'.split('@').collect{|p|
p.split('.').collect{|w| w.reverse}.join('.')}.join('@')"
--
http://mail.python.org/
Jerry He wrote:
> Hi,
> Is it possible to create a function that you can use
> without parenthesizing the arguments? for example, for
>
> def examine(str):
> .
> .
>
> Is there some way to define it so that I can call it
> like
>
> examine "string"
> instead of examine("str
anthonyberet wrote:
> This is the first time I have tried out functions (is that the main way
> of making subroutines in Python?)
A function is allowed to change it's arguments and to return None, so
yes, you can consider it as a 'subroutine'.
>
> Anyway, my function, mutate, below
>
> #make a
None wrote:
> Hello,
> I am just starting to look into python.I have been prog with php for
> several years.My question is:
> Can/Is Python used as a web scripting language
Yes, definitively.
There are in fact almost too many web-programming solutions in Python,
from the good ole cgi to the
Jon Hewer wrote:
> I do use Vim a lot. I am currently using it for some PHP development
> i'm doing. I'm been using it so much recently that i keep pressing
> ESC and typing vi commands out of vi.
>
> But, if i use Vi, then whenever i want to test some code i have to
> open up python, import the
Eric Pederson wrote:
> Raise your hand if you think the best technology wins!
>
Those who have raised hands should google for "worse is better"...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://ma
N.Davis wrote:
(snip)
> Functions existing in a module? Surely if "everything is an object" (OK
> thats Java-talk but supposedly Python will eventually follow this too)
> then there should be nothing in a module thats not part of a class.
Why ? The name of the paradigm is *object* oriented, not *c
Neil Benn wrote:
(snip)
> If you don't have a class how can you combine functionality with data
> and hold state
In Python, functions can hold state in various ways: closures,
generators, and - Python functions being instances of the function class
- attributes.
> - that is one of the points of
Roy Smith wrote:
> Andy Leszczynski writes:
>
(snip)
>>It's not a true statement. Nothing in the language enforces LSP. In
>>fact, there's not even a [way?] when a function/method is invoked to make
>>sure the type passed in is a subtype of the type you expect
>
>
> Well, that's not entirely t
Tito wrote:
>> [1] 'aName' => public, '_aName' => protected, '__aName' => private
>
>
> I didn't know this one, as I am quite new to Python. Is it really
> general use?
Yes, it's the convention.
Well, to be more exact, this is:
name => interface (intended for public use)
_name => implementati
Roy Smith wrote:
> Robert Wierschke <[EMAIL PROTECTED]> wrote:
>
>> a scripting language or a "normal" language like C++ etc.
>
>
> It is difficult to define exactly what a "scripting language" is and isn't,
You can tell buy the most common use. bash is a scripting language,
javascript is
Neil Benn wrote:
(snip)
>>
> Suppose you have a logistics tracking system available on every install
> in your company - there are 55 installs throughout the company. You
> wish to push through a patch because of a problem. If you have one
> class per file you can push that class through onto the
Magnus Lycka wrote:
> N.Davis wrote:
>
>> Functions existing in a module? Surely if "everything is an object"
>> (OK thats Java-talk but supposedly Python will eventually follow this
>> too)
>
>
> int too? ;)
Yes, int too.
>>> i = 42
>>> i.__class__
>>> i.__class__.__name__
'int'
>>> dir(i)
Daniel Schüle wrote:
> Hello
>
> I wrote a simple module, which is also supposed to be used as standalone
> program
> after considering how to avoid multiple if's I came up with this idea
>
> if __name__ == "__main__":
> if len(sys.argv) not in (3,4):
> print "usage: prog arg1 argv2
Ray wrote:
> Hello,
>
> I've been learning Python in my sparetime. I'm a Java/C++ programmer by
> trade. So I've been reading about Python OO, and I have a few questions
> that I haven't found the answers for :)
>
> 1. Where are the access specifiers? (public, protected, private)
object.name =>
Devan L wrote:
> Fausto Arinos Barbuto wrote:
>
>>Ray wrote:
>>
>>
>>>1. Where are the access specifiers? (public, protected, private)
>>
>>AFAIK, there is not such a thing in Python.
>>
>>---Fausto
>
>
> Well, technically you can use _attribute to mangle it,
__attribute would work better
Ray wrote:
> Fausto Arinos Barbuto wrote:
>
>>Ray wrote:
>>
>>
>>>1. Where are the access specifiers? (public, protected, private)
>>
>>AFAIK, there is not such a thing in Python.
>
>
> So everything is public? I know that you can prefix a member with
> underscores to make something private,
Ray wrote:
> Hello guys,
>
> OK, I've been reading some more about Python. There are some things
> about Python exception that I haven't been able to grasp:
>
> 1. This is a small thing, but why is object spelled "object", and the
> mother of all exception "Exception" (with capital E)? Why is not
Ray wrote:
> Roy Smith wrote:
>
>>Quick answer; there are none, all attributes are public.
>>
(snip)
>
> Well yeah... if you really want it, in Java you can do that too via
> reflection. Just that I'm not used to it yet so I feel a bit jittery
> with so much power on my hands!
Then wait until yo
Magnus Lycka wrote:
> bruno modulix wrote:
>
>> Magnus Lycka wrote:
>>
>>> N.Davis wrote:
>>>
>>>
>>>> Functions existing in a module? Surely if "everything is an object"
>>>> (OK thats Java-talk but s
Devan L wrote:
> Talin wrote:
>
>>I want to make a dictionary that acts like a class, in other words,
>>supports inheritance:
(snip)
>
> Dictionaries aren't classes?
They are.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECT
Talin wrote:
> I want to make a dictionary that acts like a class, in other words,
> supports inheritance:
I must be missing your point here, since dict is a class and as such
support inheritence:
>>> class MyDict(dict):pass
...
>>> d = MyDict()
>>> d.items()
[]
>>>
> If you attempt to find a
yaffa wrote:
> dear folks,
Dear Yaffa,
> i'm trying to append a semicolon to my addr string
Python strings don't have a 'append' method.
> and am using the
> syntax below. for some reason the added on of the ; doesn't work.
"doesn't work" is the worst possible description of a problem.
Pleas
Fredrik Lundh wrote:
> Jon Bowlas wrote:
(snip)
>>But I get the following error- Line 5: Yield statements are not allowed.
>
>
> umm. I might be missing something, but I cannot find any trace of that
> error message in the Python interpreter source code. it doesn't even look
> like a Python tr
wen wrote:
> on my system(win2k server, python 2.3.5),
>
import sys
print sys.path
>
> ['C:\\', 'C:\\WINNT\\system32\\python23.zip',
> 'C:\\Python23\\lib\\site-packages\\Pythonwin',
> 'C:\\Python23\\lib\\site-packages\\win32',
> 'C:\\Python23\\lib\\site-packages\\win32\\lib',
> 'C:\\Pytho
[EMAIL PROTECTED] wrote:
> anyone know of any college/school that is teaching the python language?
>
Bordeaux University (France) uses Python in a "programming 101" course.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.sp
Mike C. Fletcher wrote:
(snip)
> Though the don't go into extreme detail on decorators (they are
> basically syntactic sugar for a particular type of descriptor).
>
Err... Could you elaborate on this ? Decorators are syntactic sugar for
function wrapping, while descriptors are a 'protocol' to hook
km wrote:
> Hi all,
>
> Why is it that the implementation of empty loop so slow in python when
> compared to perl ?
>
> #i did this in python (v 1.5)
Python 1.5.2 was released in april 1999. Current Python version is 2.4.1.
Please consider upgrading - unless of course you just want to troll..
Joe T. wrote:
> Hello group, I'm new to Python and have a couple of beginner questions that
> I'm hoping someone can answer.
>
> 1. Is python something that you would recommend using for server side web
> programming?
Definitively yes.
> Something like C# or Java?
Far better IMHO.
> If so,
Terry Reedy wrote:
> "Benjamin Niemann" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
(snip)
>>In that case, you are interested in IO performance. The time spent
>>handling
>>the loop is not significant compared to the time spent executing the
>>'print' statement - which is a v
Steve Holden wrote:
(snip)
> If you want a fast language, try Holden. I've just invented it.
> Unfortunately it gets the answer to every problem wrong unless the
> answer is 42, but boy it runs quickly. The code for the whole
> interpreter (it's written in Python) follows:
>
> print 42
>
keyboar
km wrote:
>>If you want a fast language, try Holden. I've just invented it.
>>Unfortunately it gets the answer to every problem wrong unless the
>>answer is 42, but boy it runs quickly. The code for the whole
>>interpreter (it's written in Python) follows:
>
>
>>print 42
>
>
> great ! u can
Mohammed Altaj wrote:
> Dear All
>
> What i want to do is , my input is like
> 0 2
> 0 3
> 0 4
> 1 2
> 1 4
> 2 3
> 3 4
>
> I am comparing and put the number in group , like ,the first three lines
> , all has zero as first input for each line, so the out put should look
> like
> 0 2 3 4
> and so o
Mohammed Altaj wrote:
> Dear all
>
> Sorry , I confused between two things , what i said in the last e-mail i
> already managed to do using C code , But what i need to do using python
> is : my input data :
>
> 0 2 3 4
> 1 2 4
> 2 3
> 3 4
>
> what i suppose to do is , using the first line and
Mohammed Altaj wrote:
> Dear All
>
> This is my problem again ,
(snip)
>
> I managed to do all these things , but i did it in the way that i am
> reading my data as strings ( no space between numbers) something like
>
> 0124
> 124
> 23
> 34
>
> what i would like to know or to do is , how can i
max(01)* wrote:
> hi.
(snip)
> it doesn't work, since "*do_something*" and *do_something_more* are
> always executed (it seems like
>
> MYPIPE = os.popen("*some_system_command*", "r")
>
> does not raise any exception even if *some_system_command* does not
> exist/work...
>
> any help?
http://
Terry Hancock wrote:
> On Tuesday 23 August 2005 05:35 am, bruno modulix wrote:
>
(snip)
>>
>>If you hope to be taken seriously, please abandon the sms-talk style here.
>>
>
>
> I think it's reasonably clear that neither poster hoped "to be taken
>
Johnny Lee wrote:
> Here is the source:
>
(snip)
> class TestCaseTest(TestCase):
> def testRunning(self):
> print "testRunning in TestCaseTest"
> test = WasRun("testMethod")
> assert(not test.wasRun)
> test.run()
> assert(
Mohammed Altaj wrote:
>
> Thanks a lot for your valuable answer, i like the way you code ,
Thanks.
> but i
> would like to use my own, so if it is possible for you and if you have
> time, please could you fix my code, so that i can do what i want.
> Because i am using the this out put to anoth
Laszlo Zsolt Nagy wrote:
> Try this:
>
> gclas = raw_input("What is the class:")
> def Princlas():
>count = 0
>while count != 1000:
>count = count + 1
>return "Admin forceclass %s %s " % ( count , gclas )
have you tried your code ? Obviously, no, else you would have seen t
Nx wrote:
> Thanks for the many replies
>
> here is an example for what it will be used for , in this case
> fixed at 31 fieldvalues:
>
>
> inputvalues=(s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,
> s26,s27,s28,s29,s30,s31)
>MYINS
[EMAIL PROTECTED] wrote:
> Hey, if the man wants to write it that way, let the man write it that
> way. If it works for him, great... he's sure confused the heck out of
> all of us, and that translates into job security for him! As you can
> see, the name of the post is 'variable hell' and that is
1 - 100 of 218 matches
Mail list logo