Re: What the diferences : web.py Tornado Twisted ?!

2012-11-02 Thread Chris Angelico
On Sat, Nov 3, 2012 at 12:04 PM, Mark Lawrence wrote: > On 02/11/2012 15:50, nepaul wrote: >> >> What the diferences : web.py Tornado Twisted ?! >> > > Web.py is spelt w e b . p y. Tornado is spelt T o r n a d o. Twisted is > spelt T w i s t e d. Wow! That's profound! Oh, the insights made avai

Re: Haskell -> Python

2012-11-02 Thread Dave Angel
On 11/02/2012 06:27 PM, Ian Kelly wrote: > On Fri, Nov 2, 2012 at 4:24 PM, Dave Angel wrote: >> Perhaps range(heap) should be replaced by range(len(heap)) > "heaps" is a list of ints per the OP, so "heap" is an int. You're right of course . I was distracted by the fact that a heap is normally a

Re: Organisation of python classes and their methods

2012-11-02 Thread Steven D'Aprano
On Fri, 02 Nov 2012 09:08:07 +0100, Martin Hewitson wrote: > Even if one takes reasonable numbers: 20 methods, each method has 20 > lines of documentation, then we immediately have 400 lines in the file > before writing a line of code. It would seem much more natural to me to > have these methods

Re: Organisation of python classes and their methods

2012-11-02 Thread Steven D'Aprano
On Sat, 03 Nov 2012 01:06:45 +, Steven D'Aprano wrote: > 100 lines is approximately and a half pages using a 10pt font size > (depending on the font and the platform, of course). Crap. I meant approx *one* and a half pages. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Organisation of python classes and their methods

2012-11-02 Thread Steven D'Aprano
On Fri, 02 Nov 2012 07:16:09 +0100, Martin Hewitson wrote: > I'm beginning a large Python project which contains many packages, > modules and classes. The organisation of those is clear to me. [...] > I don't like having source files with > 100's of lines of code in, let alone 1000's. Why? Do you

Re: What the diferences : web.py Tornado Twisted ?!

2012-11-02 Thread Mark Lawrence
On 02/11/2012 15:50, nepaul wrote: What the diferences : web.py Tornado Twisted ?! Web.py is spelt w e b . p y. Tornado is spelt T o r n a d o. Twisted is spelt T w i s t e d. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

PDFBuilder can create composite PDFs

2012-11-02 Thread vasudevram
PDFBuilder is a tool to create composite PDFs, i.e. PDFs comprising of data from multiple different input data formats (any number of files, in any order). It is a new component of my xtopdf toolkit for PDF generation. A blog post about PDFBuilder gives more information, an example, and a downl

Re: Obnoxious postings from Google Groups

2012-11-02 Thread Mark Lawrence
On 02/11/2012 18:39, ru...@yahoo.com wrote: On 11/02/2012 03:36 AM, Jamie Paul Griffin wrote: / ru...@yahoo.com wrote on Thu 1.Nov'12 at 15:08:26 -0700 / On 11/01/2012 03:55 AM, Jamie Paul Griffin wrote: Anybody serious about programming should be using a form of UNIX/Linux if you ask me. It

Re: enabling universal newline

2012-11-02 Thread Steven D'Aprano
On Fri, 02 Nov 2012 23:22:53 +0100, Peter Kleiweg wrote: > In Python 3.1 and 3.2 > > At start-up, the value of sys.stdin.newlines is None, which means, > universal newline should be enabled. But it isn't. What makes you think it is not enabled? sys.stdin.newlines shows you the newlines actually

Re: How to generate account number?

2012-11-02 Thread Steven D'Aprano
On Sat, 03 Nov 2012 00:13:19 +0300, Andriy Kornatskyy wrote: > Requirements for `account number` generator: > > 1. Issue pseudo random consistent number (must be unique for dozen > millions of records) How much randomness do you need? From the perspective of any one user, a simple incrementing

Re: Haskell -> Python

2012-11-02 Thread Ian Kelly
On Fri, Nov 2, 2012 at 4:24 PM, Dave Angel wrote: > Perhaps range(heap) should be replaced by range(len(heap)) "heaps" is a list of ints per the OP, so "heap" is an int. -- http://mail.python.org/mailman/listinfo/python-list

Re: Haskell -> Python

2012-11-02 Thread Dave Angel
On 11/02/2012 05:40 PM, Ian Kelly wrote: > On Fri, Nov 2, 2012 at 1:19 PM, wrote: >> Is there anything anyone could recommend to make it more "Pythonic" or more >> functional. It looks clumsy next to the Haskell. > def options(heaps): > for i, heap in enumerate(heaps): > head = heap

enabling universal newline

2012-11-02 Thread Peter Kleiweg
In Python 3.1 and 3.2 At start-up, the value of sys.stdin.newlines is None, which means, universal newline should be enabled. But it isn't. So I do this: sys.stdin = io.TextIOWrapper(sys.stdin.detach(), newline=None) Now, sys.stdin.newlines is still None, but universal newline is enabled. W

Re: How to generate account number?

2012-11-02 Thread GangGreene
On Sat, 03 Nov 2012 00:13:19 +0300, Andriy Kornatskyy wrote: > Requirements for `account number` generator: > > 1. Issue pseudo random consistent number (must be unique for dozen > millions of records) > 2. Easy check validity (without a need to make a database call) > > Interested? Read more he

Re: Proper place for everything

2012-11-02 Thread Steven D'Aprano
On Fri, 02 Nov 2012 13:48:27 -0700, Jason Benjamin wrote: > Yeah, now that I take a look at the said old post on this group, I can > see why the post was ignored: > > http://markmail.org/thread/mnxpzt4jzx3zjeio Good lord man, that was FOUR AND A HALF YEARS AGO. Have you been holding a grudge fo

Re: Proper place for everything

2012-11-02 Thread Steven D'Aprano
On Fri, 02 Nov 2012 11:51:29 -0700, Jason Benjamin wrote: > On another note, it appears that Google (the only archive I can find for > this group) only has a little under 400 messages archived for this > group, Google Groups is poison. If you post with it, you will be ignored by a large percenta

Re: Proper place for everything

2012-11-02 Thread Steven D'Aprano
On Fri, 02 Nov 2012 04:20:20 -0700, Jason Benjamin wrote: > Anybody know of the appropriate place to troll and flame about various > Python related issues? I'm kind of mad about some Python stuff and I > need a place to vent where people may or may not listen, but at at least > respond. Thought

Re: Memory profiling: Python 3.2

2012-11-02 Thread Antoine Pitrou
Andrew Robinson r3dsolutions.com> writes: > > When Python3.2 is running, is there an easy way within Python to capture > the *total* amount of heap space the program is actually using (eg:real > memory)? I'm not sure what you mean with "real memory" or how precise you want that measurement t

Re: Haskell -> Python

2012-11-02 Thread Ian Kelly
On Fri, Nov 2, 2012 at 3:40 PM, Ian Kelly wrote: > On Fri, Nov 2, 2012 at 1:19 PM, wrote: >> Is there anything anyone could recommend to make it more "Pythonic" or more >> functional. It looks clumsy next to the Haskell. > > def options(heaps): > for i, heap in enumerate(heaps): >

Re: Haskell -> Python

2012-11-02 Thread Ian Kelly
On Fri, Nov 2, 2012 at 1:19 PM, wrote: > Is there anything anyone could recommend to make it more "Pythonic" or more > functional. It looks clumsy next to the Haskell. def options(heaps): for i, heap in enumerate(heaps): head = heaps[:i] tail = heaps[i+1:] yield fro

Re: How to generate account number?

2012-11-02 Thread Jose Figueroa
Hello Andriy Thanks for your work! I will try it! Jose On Fri, Nov 2, 2012 at 3:13 PM, Andriy Kornatskyy < andriy.kornats...@live.com> wrote: > > Requirements for `account number` generator: > > 1. Issue pseudo random consistent number (must be unique for dozen > millions of records) > 2. Easy

Re: Proper place for everything

2012-11-02 Thread Jason Benjamin
Yeah, now that I take a look at the said old post on this group, I can see why the post was ignored: http://markmail.org/thread/mnxpzt4jzx3zjeio On 11/02/2012 01:05 PM, Tim Golden wrote: On 02/11/2012 18:51, Jason Benjamin wrote: On another note, it appears that Google (the only archive I can

ping in bluetooth

2012-11-02 Thread Luca Sanna
hi, how do I send a ping in bluetooth? because android phones are not always visible. I can not find the ping command thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Haskell -> Python

2012-11-02 Thread Simon Foster
On 02/11/12 19:56, Dave Angel wrote: On 11/02/2012 03:19 PM, foste...@gmail.com wrote: Hi All, As part of a Nim solver I'm playing around with I'm trying to code this Haskell snippet: options [x] = zero : [ [y] | y <- [1..x - 1] ] options (x:xs) = map (++ xs) (options [x]) ++ map (x:) (

Re: Proper place for everything

2012-11-02 Thread Tim Golden
On 02/11/2012 18:51, Jason Benjamin wrote: On another note, it appears that Google (the only archive I can find for this group) only has a little under 400 messages archived for this group http://mail.python.org/pipermail/python-list/ http://markmail.org/search/?q=python#query:python%20list

Memory profiling: Python 3.2

2012-11-02 Thread Andrew Robinson
When Python3.2 is running, is there an easy way within Python to capture the *total* amount of heap space the program is actually using (eg:real memory)? And how much of that heap space is allocated to variables ( including re-capturable data not yet GC'd ) ? -- http://mail.python.org/mail

Re: Haskell -> Python

2012-11-02 Thread Dave Angel
On 11/02/2012 03:19 PM, foste...@gmail.com wrote: > Hi All, > > As part of a Nim solver I'm playing around with I'm trying to code this > Haskell snippet: > > options [x] = zero : [ [y] | y <- [1..x - 1] ] > options (x:xs) = map (++ xs) (options [x]) ++ map (x:) (options xs) > > in Python. So

Re: csv read clean up and write out to csv

2012-11-02 Thread Hans Mulder
On 2/11/12 18:25:09, Sacha Rook wrote: > I have a problem with a csv file from a supplier, so they export data to csv > however the last column in the record is a description which is marked up > with html. > > trying to automate the processing of this csv to upload elsewhere in a > useable format

Re: csv read clean up and write out to csv

2012-11-02 Thread Neil Cerutti
On 2012-11-02, Sacha Rook wrote: > Hi > > I have a problem with a csv file from a supplier, so they > export data to csv however the last column in the record is a > description which is marked up with html. > > trying to automate the processing of this csv to upload > elsewhere in a useable forma

Haskell -> Python

2012-11-02 Thread foster63
Hi All, As part of a Nim solver I'm playing around with I'm trying to code this Haskell snippet: options [x] = zero : [ [y] | y <- [1..x - 1] ] options (x:xs) = map (++ xs) (options [x]) ++ map (x:) (options xs) in Python. So far I have this, which works OK, but somehow doesn't feel right

Re: Proper place for everything

2012-11-02 Thread Jason Benjamin
On another note, it appears that Google (the only archive I can find for this group) only has a little under 400 messages archived for this group, while the slackware newsgroup has upwards 40,000 and contains posts I can't even remember that were made with one of the first emails I've ever used

Re: datetime issue

2012-11-02 Thread rurpy
On 11/02/2012 03:57 AM, Jamie Paul Griffin wrote: > / ru...@yahoo.com wrote on Thu 1.Nov'12 at 15:00:48 -0700 / >> [...list of Thunderbird problems...] > > With a list of problems like that maybe the time spent on learning > how to use a Usenet client or mua that is properly written would be > wor

Re: Obnoxious postings from Google Groups

2012-11-02 Thread rurpy
On 11/02/2012 03:36 AM, Jamie Paul Griffin wrote: > / ru...@yahoo.com wrote on Thu 1.Nov'12 at 15:08:26 -0700 / > >> On 11/01/2012 03:55 AM, Jamie Paul Griffin wrote: >>> Anybody serious about programming should be using a form of >>> UNIX/Linux if you ask me. It's inconceivable that these syste

Re: Organisation of python classes and their methods

2012-11-02 Thread Paul Rubin
Martin Hewitson writes: >> you want just ONE method, something like "map"... > Well, because one of the features that the framework will have is to > capture history steps (in a tree structure) so that each processing > step the user does is tracked. So while methods such as abs(), cos(), > etc wi

Re: How to improve the usability of nested packages

2012-11-02 Thread Stefan H. Holek
Hi Michael, What we have learned from creating the Zope Toolkit (formerly Zope 3), is that __init__.py files in namespace packages should be empty, and imports should be absolute. [1] That said, there are ways to avoid import cycles. One is to very carefully craft your modules so they do not h

Re: Proper place for everything

2012-11-02 Thread Jason Benjamin
It's a *really* old post, but it was back when I was first started learning Python when Python 3 wasn't out yet. It was a dumb question so I can see why people wouldn't have had interest in answering it, but I had been developing a game and wanted to find a recommendation on a GUI toolkit.

Re: How to improve the usability of nested packages

2012-11-02 Thread Terry Reedy
nested package == subpackage or would you maybe structure the library entirely different? Based on my limited experience with subpackages* plus reports on this list about problems, such as yours, I have concluded that subpackages are an attractive nuisance that are generally more trouble tha

Re: Organisation of python classes and their methods

2012-11-02 Thread Martin Hewitson
On 2, Nov, 2012, at 06:24 PM, Paul Rubin wrote: > Martin Hewitson writes: >> Well, here we disagree. Suppose I have a class which encapsulates >> time-series data. Below is a list of the absolute minimum methods one >> would have to process that data. ... >> 'abs' >> 'acos' >> 'asin' >>

Re: Obnoxious postings from Google Groups

2012-11-02 Thread Ian Kelly
On Fri, Nov 2, 2012 at 3:36 AM, Jamie Paul Griffin wrote: > / ru...@yahoo.com wrote on Thu 1.Nov'12 at 15:08:26 -0700 / > >> On 11/01/2012 03:55 AM, Jamie Paul Griffin wrote: >> > Anybody serious about programming should be using a form of >> > UNIX/Linux if you ask me. It's inconceivable that th

csv read clean up and write out to csv

2012-11-02 Thread Sacha Rook
Hi I have a problem with a csv file from a supplier, so they export data to csv however the last column in the record is a description which is marked up with html. trying to automate the processing of this csv to upload elsewhere in a useable format. If i open the csv with csved it looks like

Re: Organisation of python classes and their methods

2012-11-02 Thread Paul Rubin
Martin Hewitson writes: > Well, here we disagree. Suppose I have a class which encapsulates > time-series data. Below is a list of the absolute minimum methods one > would have to process that data. ... > 'abs' > 'acos' > 'asin' > ... Ok, THERE is your problem. Why do you have separ

Re: Organisation of python classes and their methods

2012-11-02 Thread Mark Lawrence
On 02/11/2012 14:49, Martin Hewitson wrote: [Top posting fixed] BTW: If you told us which language(s) you have a background in, it could be easier to help you with identifying the idioms in that language that turn into misconceptions when applied to Python. Greetings! Uli [1] Actual

Re: python-forum

2012-11-02 Thread Sacha Rook
Thanks for the update and the invite don't mind if I do. cheers sachlar On 2 November 2012 08:26, Chris Rebert wrote: > On Fri, Nov 2, 2012 at 1:19 AM, Sacha Rook wrote: > > Hi does anyone know where the python-form.org site has gone? > > Some googling suggests that it's under new managemen

What the diferences : web.py Tornado Twisted ?!

2012-11-02 Thread nepaul
What the diferences : web.py Tornado Twisted ?! -- http://mail.python.org/mailman/listinfo/python-list

Re: Avoiding defunct processes

2012-11-02 Thread Nobody
On Thu, 01 Nov 2012 19:16:17 -0700, Richard wrote: > I create child processes with subprocess.Popen(). > Then I either wait for them to finish or kill them. > Either way these processes end up as defunct until the parent process > completes: > $ ps e > 6851 pts/5Z+ 1:29 [python] You need

Re: Organisation of python classes and their methods

2012-11-02 Thread Martin Hewitson
> > > BTW: If you told us which language(s) you have a background in, it could be > easier to help you with identifying the idioms in that language that turn > into misconceptions when applied to Python. I'm considering porting some MATLAB code to python to move away from commercial software

Re: Organisation of python classes and their methods

2012-11-02 Thread Martin Hewitson
On 2, Nov, 2012, at 11:49 AM, Ulrich Eckhardt wrote: > Am 02.11.2012 09:20, schrieb Martin Hewitson: >> Well, here we disagree. Suppose I have a class which encapsulates >> time-series data. Below is a list of the absolute minimum methods one >> would have to process that data. > [...] > > 'abs

Re: Proper place for everything

2012-11-02 Thread Tim Golden
On 02/11/2012 13:49, Jason Benjamin wrote: > Yeah, alright. I've just found that if you mention anything about a > library that has well established competitors, the post will tend to get > ignored here. I'm not sure exactly what you're referring to. (Perhaps you can link to an existing post or d

Re: Obnoxious postings from Google Groups

2012-11-02 Thread Grant Edwards
On 2012-11-02, Steven D'Aprano wrote: > On Fri, 02 Nov 2012 10:32:08 +1100, Chris Angelico wrote: > >> And there are probably still a few around who maintain that Java, C#, >> and even C are too modern, and that serious programmers use FORTRAN or >> COBOL. > > Huh. If you're messing about with anc

Re: Proper place for everything

2012-11-02 Thread Zero Piraeus
: On 2 November 2012 07:20, Jason Benjamin wrote: > Anybody know of the appropriate place to troll and flame about various > Python related issues? I don't know about appropriate, but there'd be a certain amount of poetic justice in using one of the alt.conspiracy.* or alt.religion.* newsgroups

Re: Proper place for everything

2012-11-02 Thread Jason Benjamin
Yeah, alright. I've just found that if you mention anything about a library that has well established competitors, the post will tend to get ignored here. On 11/02/2012 04:38 AM, Robert Kern wrote: On 11/2/12 11:20 AM, Jason Benjamin wrote: Anybody know of the appropriate place to troll and

Re: Proper place for everything

2012-11-02 Thread Ulrich Eckhardt
Am 02.11.2012 12:20, schrieb Jason Benjamin: Anybody know of the appropriate place to troll and flame about various Python related issues? I'm kind of mad about some Python stuff and I need a place to vent where people may or may not listen, but at at least respond. Thought this would be a stra

Re: Proper place for everything

2012-11-02 Thread Alister
On Fri, 02 Nov 2012 04:20:20 -0700, Jason Benjamin wrote: > Anybody know of the appropriate place to troll and flame about various > Python related issues? I'm kind of mad about some Python stuff and I > need a place to vent where people may or may not listen, but at at least > respond. Thought

Re: Proper place for everything

2012-11-02 Thread Tim Golden
On 02/11/2012 11:20, Jason Benjamin wrote: > Anybody know of the appropriate place to troll and flame about various > Python related issues? I'm kind of mad about some Python stuff and I > need a place to vent where people may or may not listen, but at at least > respond. Thought this would be a

Re: Proper place for everything

2012-11-02 Thread Robert Kern
On 11/2/12 11:20 AM, Jason Benjamin wrote: Anybody know of the appropriate place to troll and flame about various Python related issues? I'm kind of mad about some Python stuff and I need a place to vent where people may or may not listen, but at at least respond. Thought this would be a strang

Proper place for everything

2012-11-02 Thread Jason Benjamin
Anybody know of the appropriate place to troll and flame about various Python related issues? I'm kind of mad about some Python stuff and I need a place to vent where people may or may not listen, but at at least respond. Thought this would be a strange question, but I might as well start som

Re: date and time comparison how to

2012-11-02 Thread Adam Tauno Williams
On Mon, 2012-10-29 at 16:13 -0700, noydb wrote: > All, > I need help with a date and time comparison. > Say a user enters a date-n-time and a file on disk. I want to compare > the date and time of the file to the entered date-n-time; if the file > is newer than the entered date-n-time, add the fil

Re: Organisation of python classes and their methods

2012-11-02 Thread Ulrich Eckhardt
Am 02.11.2012 09:08, schrieb Martin Hewitson: On 2, Nov, 2012, at 08:38 AM, Paul Rubin wrote: Martin Hewitson writes: So, is there a way to put these methods in their own files and have them 'included' in the class somehow? ... Is there an official python way to do this? I don't like having s

Re: Organisation of python classes and their methods

2012-11-02 Thread Ulrich Eckhardt
Am 02.11.2012 09:20, schrieb Martin Hewitson: Well, here we disagree. Suppose I have a class which encapsulates time-series data. Below is a list of the absolute minimum methods one would have to process that data. [...] > 'abs' 'acos' 'asin' 'atan' 'atan2' 'average' 'cohere' 'conv' 'corr' > 'co

Re: word sense disambiguation

2012-11-02 Thread Robert Kern
On 11/2/12 10:49 AM, nachiket wrote: hello, do you know how to perform word sense disambiguation. Input:- sentence Output:- Sense tagged words. You've asked this already, and I have pointed you to NLTK. http://nltk.org/ http://nltk.org/book/ch06.html http://nltk.org/api/nltk.classify.h

Re: Organisation of python classes and their methods

2012-11-02 Thread Robert Kern
On 11/2/12 10:48 AM, Mark Lawrence wrote: On 02/11/2012 08:45, Martin Hewitson wrote: On 2, Nov, 2012, at 09:40 AM, Mark Lawrence wrote: On 02/11/2012 08:08, Martin Hewitson wrote: Even if one takes reasonable numbers: 20 methods, each method has 20 lines of documentation, then we immediat

Re: Organisation of python classes and their methods

2012-11-02 Thread Robert Kern
On 11/2/12 10:21 AM, Peter Otten wrote: Martin Hewitson wrote: On 2, Nov, 2012, at 09:40 AM, Mark Lawrence wrote: 20 lines of documentation per method? As far as I'm concerned that's not a smell, that's a stink. Wow, I don't think I've ever been criticised before for writing too much doc

word sense disambiguation

2012-11-02 Thread nachiket
hello, do you know how to perform word sense disambiguation. Input:- sentence Output:- Sense tagged words. -- http://mail.python.org/mailman/listinfo/python-list

Re: Organisation of python classes and their methods

2012-11-02 Thread Mark Lawrence
On 02/11/2012 08:45, Martin Hewitson wrote: On 2, Nov, 2012, at 09:40 AM, Mark Lawrence wrote: On 02/11/2012 08:08, Martin Hewitson wrote: Even if one takes reasonable numbers: 20 methods, each method has 20 lines of documentation, then we immediately have 400 lines in the file before writ

Re: Negative array indicies and slice()

2012-11-02 Thread Robert Kern
On 11/2/12 8:57 AM, Andrew Robinson wrote: Hi Ian, I apologize for trying your patience with the badly written code example. All objects were meant to be ThirdParty(), the demo was only to show how a slice() filter could have been applied for the reasons PEP357 made index() to exist. eg: becaus

Re: Organisation of python classes and their methods

2012-11-02 Thread Steven D'Aprano
On Fri, 02 Nov 2012 08:40:06 +, Mark Lawrence wrote: > On 02/11/2012 08:08, Martin Hewitson wrote: >> >> Even if one takes reasonable numbers: 20 methods, each method has 20 >> lines of documentation, then we immediately have 400 lines in the file >> before writing a line of code. It would see

Re: Organisation of python classes and their methods

2012-11-02 Thread Peter Otten
Martin Hewitson wrote: > On 2, Nov, 2012, at 09:40 AM, Mark Lawrence > wrote: >> 20 lines of documentation per method? As far as I'm concerned that's not >> a smell, that's a stink. > > Wow, I don't think I've ever been criticised before for writing too much > documentation :) > > I guess we

Re: Organisation of python classes and their methods

2012-11-02 Thread Frank Millman
On 02/11/2012 08:16, Martin Hewitson wrote: Dear list, I'm relatively new to Python and have googled and googled but haven't found a reasonable answer to this question, so I thought I'd ask it here. I'm beginning a large Python project which contains many packages, modules and classes. The or

Re: datetime issue

2012-11-02 Thread Jamie Paul Griffin
/ ru...@yahoo.com wrote on Thu 1.Nov'12 at 15:00:48 -0700 / > > * In Search dialog clicked on the Search in folder dropdown after > an earlier search and TB crashed (disappeared along with the > new message I was editing.) [3.0.1] > > * Search for japanese text in body no longer works (

Re: Organisation of python classes and their methods

2012-11-02 Thread Martin Hewitson
On 2, Nov, 2012, at 09:40 AM, Mark Lawrence wrote: > On 02/11/2012 08:08, Martin Hewitson wrote: >> >> Even if one takes reasonable numbers: 20 methods, each method has 20 lines >> of documentation, then we immediately have 400 lines in the file before >> writing a line of code. It would seem

Re: Obnoxious postings from Google Groups

2012-11-02 Thread Jamie Paul Griffin
/ ru...@yahoo.com wrote on Thu 1.Nov'12 at 15:08:26 -0700 / > On 11/01/2012 03:55 AM, Jamie Paul Griffin wrote: > > Anybody serious about programming should be using a form of > > UNIX/Linux if you ask me. It's inconceivable that these systems > > should be avoided if you're serious about Softwar

Re: Organisation of python classes and their methods

2012-11-02 Thread Chris Angelico
On Fri, Nov 2, 2012 at 7:08 PM, Martin Hewitson wrote: > > On 2, Nov, 2012, at 08:38 AM, Paul Rubin wrote: > >> Martin Hewitson writes: >>> So, is there a way to put these methods in their own files and have >>> them 'included' in the class somehow? ... Is there an official python >>> way to do

Re: Organisation of python classes and their methods

2012-11-02 Thread Peter Otten
Martin Hewitson wrote: > > On 2, Nov, 2012, at 09:00 AM, Peter Otten <__pete...@web.de> wrote: > >> Martin Hewitson wrote: >> >>> Dear list, >>> >>> I'm relatively new to Python and have googled and googled but haven't >>> found a reasonable answer to this question, so I thought I'd ask it >>>

Re: pythonic way

2012-11-02 Thread Chris Angelico
On Fri, Nov 2, 2012 at 7:58 PM, jack wrote: > thanks,but I don't think enumerate() is my want > Have some ways to operate the reference of element,not a copy when I tried > to traverse a list? > > I'm so sorry about my poor English, hope you don't mind it. No probs, I'll be a little less vague an

Re: Organisation of python classes and their methods

2012-11-02 Thread Robert Kern
On 11/2/12 8:20 AM, Martin Hewitson wrote: On 2, Nov, 2012, at 09:00 AM, Peter Otten <__pete...@web.de> wrote: Martin Hewitson wrote: Dear list, I'm relatively new to Python and have googled and googled but haven't found a reasonable answer to this question, so I thought I'd ask it here. I

Re: Negative array indicies and slice()

2012-11-02 Thread Andrew Robinson
Hi Ian, I apologize for trying your patience with the badly written code example. All objects were meant to be ThirdParty(), the demo was only to show how a slice() filter could have been applied for the reasons PEP357 made index() to exist. eg: because numpy items passed to __getitems__ via

Re: pythonic way

2012-11-02 Thread jack
thanks,but I don't think enumerate() is my want Have some ways to operate the reference of element,not a copy when I tried to traverse a list? I'm so sorry about my poor English, hope you don't mind it. On 2012/11/2 15:56, Chris Angelico wrote: On Fri, Nov 2, 2012 at 6:14 PM, jack wrote: So

Re: Organisation of python classes and their methods

2012-11-02 Thread Mark Lawrence
On 02/11/2012 08:08, Martin Hewitson wrote: Even if one takes reasonable numbers: 20 methods, each method has 20 lines of documentation, then we immediately have 400 lines in the file before writing a line of code. It would seem much more natural to me to have these methods in their own file,

Re: lazy properties?

2012-11-02 Thread Stefan H. Holek
On 01.11.2012, at 22:38, Andrea Crotti wrote: > Seeing the wonderful "lazy val" in Scala I thought that I should try to get > the following also in Python. > The problem is that I often have this pattern in my code: > > class Sample: >def __init__(self): >self._var = None > >@pr

Re: python-forum

2012-11-02 Thread Chris Rebert
On Fri, Nov 2, 2012 at 1:19 AM, Sacha Rook wrote: > Hi does anyone know where the python-form.org site has gone? Some googling suggests that it's under new management: http://mcompute.co.uk/showthread.php?tid=2161 But comp.lang.python/python-list is better anyway [ ;-) ], and you're already here

Re: Organisation of python classes and their methods

2012-11-02 Thread Martin Hewitson
On 2, Nov, 2012, at 09:00 AM, Peter Otten <__pete...@web.de> wrote: > Martin Hewitson wrote: > >> Dear list, >> >> I'm relatively new to Python and have googled and googled but haven't >> found a reasonable answer to this question, so I thought I'd ask it here. >> >> I'm beginning a large Pyth

python-forum

2012-11-02 Thread Sacha Rook
Hi does anyone know where the python-form.org site has gone? -- http://mail.python.org/mailman/listinfo/python-list

Re: Organisation of python classes and their methods

2012-11-02 Thread Martin Hewitson
On 2, Nov, 2012, at 08:38 AM, Paul Rubin wrote: > Martin Hewitson writes: >> So, is there a way to put these methods in their own files and have >> them 'included' in the class somehow? ... Is there an official python >> way to do this? I don't like having source files with 100's of lines >> of

Re: Organisation of python classes and their methods

2012-11-02 Thread Peter Otten
Martin Hewitson wrote: > Dear list, > > I'm relatively new to Python and have googled and googled but haven't > found a reasonable answer to this question, so I thought I'd ask it here. > > I'm beginning a large Python project which contains many packages, modules > and classes. The organisation

Re: pythonic way

2012-11-02 Thread Chris Angelico
On Fri, Nov 2, 2012 at 6:14 PM, jack wrote: > Sometimes, I need to alter the element as traverse a list like this (it's a > sample): > c = range(10) > i = 0 > for ele in c: > # do something > # branch: > c[i] = # value > i += 1 > > How to be pythonic

Re: Organisation of python classes and their methods

2012-11-02 Thread Paul Rubin
Martin Hewitson writes: > So, is there a way to put these methods in their own files and have > them 'included' in the class somehow? ... Is there an official python > way to do this? I don't like having source files with 100's of lines > of code in, let alone 1000's. That code sounds kind of sme

Organisation of python classes and their methods

2012-11-02 Thread Martin Hewitson
Dear list, I'm relatively new to Python and have googled and googled but haven't found a reasonable answer to this question, so I thought I'd ask it here. I'm beginning a large Python project which contains many packages, modules and classes. The organisation of those is clear to me. Now, the

Re: pythonic way

2012-11-02 Thread jack
Sometimes, I need to alter the element as traverse a list like this (it's a sample): c = range(10) i = 0 for ele in c: # do something # branch: c[i] = # value i += 1 How to be pythonic? 2012/11/2 0:54, Zero Piraeus : : On 1 November 2012 11:32,