Re: The Industry choice

2005-01-02 Thread Peter Dembinski
Paul Rubin writes: [...] > I don't understand that. If I see "str x = str(3)", then I know > that x is a string. def foo(x): return str(x) str = foo(x) And now, let's say that foo()'s definition is in another module. It is hard for a programmer to quickly determ

Re: The Industry choice

2005-01-02 Thread Peter Dembinski
"Donn Cave" <[EMAIL PROTECTED]> writes: [...] > For me, the effect is striking. I pound out a little program, > couple hundred lines maybe, and think "hm, guess that's it" and save > it to disk. Run the compiler, it says "no, that's not it - look > at line 49, where this expression has type st

[OT] Re: The Industry choice

2005-01-02 Thread Peter Dembinski
Paul Rubin <http://[EMAIL PROTECTED]> writes: > Peter Dembinski <[EMAIL PROTECTED]> writes: >> If it has to be both reliable and secure, I suggest you used more >> redundant language such as Ada 95. > > That's something to think about and it's come up

Re: The Industry choice

2005-01-02 Thread Peter Dembinski
Peter Dembinski <[EMAIL PROTECTED]> writes: [...] > str = foo(x) (ick!) it should be: bar = foo(x) -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-02 Thread Peter Dembinski
Peter Dembinski <[EMAIL PROTECTED]> writes: > Peter Dembinski <[EMAIL PROTECTED]> writes: > > [...] > >> str = foo(x) > > (ick!) it should be: > > bar = foo(x) Besides, shouldn't str be a reserved word or something? -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-02 Thread Peter Dembinski
Bulba! <[EMAIL PROTECTED]> writes: [...] > The point is obviously "cover your ass" attitude of managers: Managers get paid for taking risk :) -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-03 Thread Peter Dembinski
Peter Hansen <[EMAIL PROTECTED]> writes: > Roy Smith wrote: >> "Terry Reedy" <[EMAIL PROTECTED]> wrote: >> >>> None has been reserved because there is no known good use for >>> overriding it. >> Should I infer from the above that there's a known bad use? > > Yes: making None equal to the integer 3

[OT] Re: The Industry choice

2005-01-06 Thread Peter Dembinski
Bulba! <[EMAIL PROTECTED]> writes: [...] > That's remarkable, first time I see smth like this - > out of curiosity, could you say a word where was that? Are you the same Bulba I know from alt.pl.comp.os.hacking? -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2004-12-31 Thread Peter Dembinski
"Thomas Bartkus" <[EMAIL PROTECTED]> writes: [...] > > What makes such companies to choose Java over dynamic, productive > > languages like Python? Are there any viable, technical reasons > > for that? > > Are there "viable, technical reasons"? That would be doubtful. > > But > > There is a

Re: The Industry choice

2004-12-31 Thread Peter Dembinski
Paul Rubin writes: [...] > I'm involved in a development project for something that's security > critical and has to be reliable. The implementation language hasn't > been chosen yet. Python and Java are both possibilities. I'm fine > with the idea of using Python fo

Re: Python + Lisp integration?

2004-12-31 Thread Peter Dembinski
Simo Melenius <[EMAIL PROTECTED]> writes: > Hi, > > I'm wondering (after a bit of googling) whether there exists > a Python binding to any open source Lisp environment (like librep > or some Scheme or Common Lisp implementation) that could > be recommended for non-toy use? Dunno about non-toy

Refactoring in Python.

2005-04-19 Thread Peter Dembinski
I am trying to write Master Thesis on refactoring Python code. Where should I look for information? -- http://www.dembiński.prv.pl -- http://mail.python.org/mailman/listinfo/python-list

Re: Refactoring in Python.

2005-04-19 Thread Peter Dembinski
Skip Montanaro <[EMAIL PROTECTED]> writes: > Peter> I am trying to write Master Thesis on refactoring Python > Peter> code. Where should I look for information? > > I'm not sure, but one piece of code to check out would probably > be Bicycle Repair Man, a early-stage prototype refactorin

Re: Refactoring in Python.

2005-04-20 Thread Peter Dembinski
[EMAIL PROTECTED] writes: > Investigate the CVS histories of the few 1000s python projects > available at www.sourceforge.net I don't work with these guys :> -- http://www.pdemb.prv.pl -- http://mail.python.org/mailman/listinfo/python-list

Re: Can .py be complied?

2005-04-30 Thread Peter Dembinski
[EMAIL PROTECTED] (John J. Lee) writes: [snap] > Until they install the next program that does this. If we talk about _real_ users from the _real_ world, the most of them would just kill the app (or what is the name for stopping running program in w32) when the download begins[1] :) [1] 'hey, i

Re: Python features

2005-05-12 Thread Peter Dembinski
On Sun, 08 May 2005 10:02:42 +0200, Andrà Roberge <[EMAIL PROTECTED]> wrote: [...] > google for "python" and "functional"; first link: > http://www-106.ibm.com/developerworks/linux/library/l-prog.html [...] > Imperative programming languages are the most commonly used languages. > Examples

Re: function with variable arguments

2005-05-13 Thread Peter Dembinski
On Fri, 13 May 2005 11:52:34 +0200, Xah Lee <[EMAIL PROTECTED]> wrote: > i wanted to define a function where the number of argument matters. > Example: > > def Range(n): > return range(n+1) > > def Range(n,m): > return range(n,m+1) > > def Range(n,m,step): > return range(n,m+1,step) >

Re: Precision?

2005-05-15 Thread Peter Dembinski
"Steffen Glückselig" <[EMAIL PROTECTED]> writes: > Hello, > > I've just wanted to check Python's abilities as a calculator and this > is what came out: > 1.0 + 3.0 + 4.6 > 8.5996 > > Ehm, how could I get the intuitively 'correct' result of - say - 8.6? > ;-) This is as correct as

Re: question about the id()

2005-05-16 Thread Peter Dembinski
Skip Montanaro <[EMAIL PROTECTED]> writes: > kyo> Can someone explain why the id() return the same value, and > kyo> why these values are changing? > > Instance methods are created on-the-fly. So, the interpreter creates new 'point in address space' every time there is object-dot-method

Re: question about the id()

2005-05-16 Thread Peter Dembinski
[EMAIL PROTECTED] (Bengt Richter) writes: [snap] >>So, the interpreter creates new 'point in address space' every time >>there is object-dot-method invocation in program? [optimization] > BTW, a typical performance optimization (not done automatically by python) > is to hoist unchanging-value e

Re: question about the id()

2005-05-17 Thread Peter Dembinski
"Giovanni Bajo" <[EMAIL PROTECTED]> writes: > Peter Dembinski wrote: > >>> BTW, a typical performance optimization (not done automatically by >>> python) is to hoist unchanging-value expressions out of loops, and >>> obj.method is often such

Re: speeding up Python script

2005-05-18 Thread Peter Dembinski
"Luis P. Mendes" <[EMAIL PROTECTED]> writes: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > I have a 1000 line python script that takes many hours to finish. > It is running with six inside 'for' loops. > > I've searched the net for ways to speed up the proccess. > > Psyco improves

Re: How to learn OO of python?

2005-05-18 Thread Peter Dembinski
could ildg <[EMAIL PROTECTED]> writes: > I have learned python for over a month. > I heard that it was very easy to learn, but when I tried to know OO > of python, > I found it really weird, some expressions seem very hard to understand, > and I can't find enough doc to know any more about it. Th

Re: Is Python suitable for a huge, enterprise size app?

2005-05-18 Thread Peter Dembinski
"keirr" <[EMAIL PROTECTED]> writes: [snap] > I wouldn't, especially[1] if your thousands of business objects get > allocated/deallocated as the system runs. Currently python's memory > usage can grow rapidly (from the perspective of the o/s) when large > numbers of objects are repeatedly created

Re: Access lotus notes using Python

2005-05-23 Thread Peter Dembinski
"Sateesh" <[EMAIL PROTECTED]> writes: > Hi, > Is it possible to access Lotus notes using Python? Can anyone > provide me some pointers? jython + LN Java bindings may be usable -- http://www.peter.dembinski.prv.pl -- http://mail.python.org/mailman/listinfo/python-list

Re: What are OOP's Jargons and Complexities?

2005-05-23 Thread Peter Dembinski
"Xah Lee" <[EMAIL PROTECTED]> writes: [snap] put it on your blog -- http://www.peter.dembinski.prv.pl -- http://mail.python.org/mailman/listinfo/python-list

Re: idiom for constructor?

2005-06-04 Thread Peter Dembinski
Steven Bethard <[EMAIL PROTECTED]> writes: > Mac wrote: >> Is there a nice Python idiom for constructors which would expedite >> the following? >> class Foo: >> def __init__(self, a,b,c,d,...): >> self.a = a >> self.b = b >> self.c = c >> self.d = d >> ... > > py> class Foo(o

Re: idiom for constructor?

2005-06-04 Thread Peter Dembinski
Peter Dembinski <[EMAIL PROTECTED]> writes: [snap] Eh, sorry, it should look like this: > #v+ > > class A: > def __init__(self, a, b, c, d): > initial = {'a' : 1, 'b' : 2, 'c' : 3, 'd' : 4} initial =

Re: idiom for constructor?

2005-06-04 Thread Peter Dembinski
Steven Bethard <[EMAIL PROTECTED]> writes: > Peter Dembinski wrote: >>class A: >>def __init__(self, a, b, c, d): >>initial = {'a' : a, 'b' : b, 'c' : c, 'd' : d} >>for param in initial.keys(): >>

Re: Scope

2005-06-04 Thread Peter Dembinski
Elliot Temple <[EMAIL PROTECTED]> writes: > I want to write a function, foo, so the following works: > > def main(): > n = 4 > foo(n) > print n > > #it prints 7 > > if foo needs to take different arguments, that'd be alright. > > Is this possible? It is possible, but the more natur

Re: Scope

2005-06-05 Thread Peter Dembinski
Steven Bethard <[EMAIL PROTECTED]> writes: > Peter Dembinski wrote: >> AFAIK inc is builtin function. And builtin functions doesn't have >> to be real functions, they can be just aliases to Python's VM >> bytecodes or sets of bytecodes. > > Wrong o

Re: python bytecode grammar

2005-06-12 Thread Peter Dembinski
"Terry Reedy" <[EMAIL PROTECTED]> writes: > "M1st0" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> where I can find the grammar of python bytecode ? ( better if is in >> BCF > > I believe the top-level production is something like > BYTECODE := (OPCODE ARGS)* ROTFL :) -- http:

Re: How to get/set class attributes in Python

2005-06-12 Thread Peter Dembinski
Kalle Anke <[EMAIL PROTECTED]> writes: [snap] >> sys.maxint = -12345 > > I don't really understand what you're meaning. He meant None = 1 :> -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get/set class attributes in Python

2005-06-12 Thread Peter Dembinski
"vincent wehren" <[EMAIL PROTECTED]> writes: > "Peter Dembinski" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > news:[EMAIL PROTECTED] > | Kalle Anke <[EMAIL PROTECTED]> writes: > | > | [snap] > | > | >> sys.maxint = -12345 >

Re: How to get/set class attributes in Python

2005-06-12 Thread Peter Dembinski
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: [snap] >> Being an untyped language, Python does not require you to enforce >> types. > > Nope. Python *is* typed. But it doesnt confuse implementation > with semantic. Python is typed. And its type system may look strange for anyone who did only

Re: What is different with Python ?

2005-06-12 Thread Peter Dembinski
Steven D'Aprano <[EMAIL PROTECTED]> writes: [snap] > new_text = "" > for word in text: > new_text = new_text + process(word) new_text = "".join(map(process, text)) (I couldn't resist) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get/set class attributes in Python

2005-06-12 Thread Peter Dembinski
Chris Spencer <[EMAIL PROTECTED]> writes: > Peter Dembinski wrote: >> Bruno Desthuilliers <[EMAIL PROTECTED]> writes: >> >>> Nope. Python *is* typed. But it doesnt confuse implementation with >>> semantic. >> Python is typed. And its type syst

Re: python bytecode grammar

2005-06-12 Thread Peter Dembinski
"Terry Reedy" <[EMAIL PROTECTED]> writes: > "Peter Dembinski" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> "Terry Reedy" <[EMAIL PROTECTED]> writes: >>> I believe the top-level production is something lik

Re: implicit variable declaration and access

2005-06-13 Thread Peter Dembinski
Benji York <[EMAIL PROTECTED]> writes: [snap] >> code = x + '= 0' >> exec(code) > > You should generally stay away from exec for lots of reasons. Code 'refactorizability' is one of them. -- http://mail.python.org/mailman/listinfo/python-list

Re: implicit variable declaration and access

2005-06-13 Thread Peter Dembinski
Tom Anderson <[EMAIL PROTECTED]> writes: [snap] > The MAtrix had evarything in it: guns, a juimping off teh walls, > flying guns, a bullet tiem, evil computar machenes, numbers that > flew, flying gun bullets in slowar motian, juimping into a gun, dead > police men, computar hackeing, Kevin Mitni

Re: UML to Python/Java code generation

2005-06-17 Thread Peter Dembinski
"Grigoris Tsolakidis" <[EMAIL PROTECTED]> writes: > There is tool to generate UML from Python Code... The best is human brain. -- http://mail.python.org/mailman/listinfo/python-list