Re: Adherence to PEP 8 for published code (was: ANN: pry unit testing framework)

2008-04-07 Thread Aldo Cortesi
it so, you have my > sympathy. You re-enforce the point you're trying to counter beautifully. Thanks for driving my argument home. Regards, Aldo -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pry unit testing framework

2008-04-06 Thread Aldo Cortesi
by then we'll all be too busy swanning about in our flying cars and having holidays on Mars to care. ;) So, no, I don't think inclusion in the standard library should be a universal ambition, and it's certainly not one I have for Pry. Regards, Aldo -- Aldo Cor

Re: ANN: pry unit testing framework

2008-04-06 Thread Aldo Cortesi
ibe this - saying that these frameworks support "expanded error reporting for Python assert statements" might be more accurate. Regards, Aldo -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pry unit testing framework

2008-04-06 Thread Aldo Cortesi
erous part is converting to assertion-based testing, something that will improve the clarity and readability of your tests anyway. Regards, Aldo -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pry unit testing framework

2008-04-06 Thread Aldo Cortesi
I might experiment with extending Pry to gather and run doctests and unittests. At this stage, however, I don't believe the (significant) effort would be worth it. Regards, Aldo -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mai

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
t it is Kay and and indeed you who are temporarily out of line with the tone of the list. A more impartial re-reading of the debate so far might make you judge my final, admittedly angry, response more fairly. Regards, Aldo -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 00

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
might add. To me, this means the burden is not worth it. Since I designed and wrote Pry, I get to make that choice, not you, and the type of feeble, offensive "argument" you've provided is unlikely to change my mind. Regards, Aldo -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
;m just going to have to assure you that I do in fact know what I'm talking about, and leave it at that. Never fear - I will personally ensure that Pry's vast, fanatical legion of goose-stepping users does not force you to use it if you don't want to... Regards, Aldo -- Aldo Cor

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
less, of course, you were joking and that was precisely the point you were trying to make... in which case I apologise and you can ignore this... ;) Regards, Aldo -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
r some reason, that IS a big advantage. If, however, you plan to use any of nose's advanced features, you will be incompatible with unittest anyway, and you should feel free to consider competing suites like test.py and Pry. Regards, Aldo -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
y and see what you think. Regards, Aldo -- Aldo Cortesi Managing Director M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
use it has Java > style naming conventions i.e. for bike shading reasons Do you mean bike shedding, perhaps? At any rate, your impression is mostly incorrect. Regards, Aldo -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pry unit testing framework

2008-04-05 Thread Aldo Cortesi
omething you want, maybe you should give Pry another look. If Pry itself is not to your taste, there are other excellent test frameworks like py.test that have also chosen not to mindlessly duplicate all of unittest's inadequacies. Broaden your horizons and explore some of these - your code wil

Re: ANN: pry unit testing framework

2008-04-04 Thread Aldo Cortesi
letting me know about this. I've just released version 0.2.1 of Pry, which addresses this and a few other Windows compatibility issues. You can download it here: http://dev.nullcube.com/download/pry-0.2.1.tar.gz Regards, Aldo -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pry unit testing framework

2008-04-01 Thread Aldo Cortesi
Voila! You have a nice command-line interface, coverage analysis, and an easy path to saner, better-engineered unit tests. Internal consistency in this case is much more important than the style guide, which intends only to standardise naming conventions within the Python standard library, and even

Re: ANN: cubictemp template engine

2008-04-01 Thread Aldo Cortesi
here you can instantiate a Template once and use it many times Cubictemp should be very fast. Regards, Aldo -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mailman/listinfo/python-list

ANN: pry unit testing framework

2008-04-01 Thread Aldo Cortesi
fixture management * No implicit instantiation of test suits * Powerful command-line interface Download: http://dev.nullcube.com Manual: http://dev.nullcube.com/doc/pry/index.html -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com -- http://mail.python.org/mailman

ANN: cubictemp template engine

2008-04-01 Thread Aldo Cortesi
templating systems out there. Cubictemp proves that a templating sytem can be elegant, powerful, fast and remain compact. Download: http://dev.nullcube.com Manual: http://dev.nullcube.com/doc/cubictemp/index.html -- Aldo Cortesi M: +61 419 492 863 P: +61 1300 887 007 W: www.nullcube.com

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Aldo Cortesi
lly "clean" code (say, from a > submitted patch) with a tool because I can't reliably verify it by eye. Surely, in context, the meaning is clear? "By eye" here means nothing more nor less than a literal reading suggests. Taking these sentences to be an arg

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Aldo Cortesi
the more obvious problems with your technically illiterate hope that one could homogenize characters so that everything that looks the same has the same meaning. Fiddle around with your fontsets a bit - you only have to find one combination where the two glyps look the same to prove my case... Regards, Aldo -- Aldo Cortesi [EMAIL PROTECTED] http://www.nullcube.com Mob: 0419 492 863 -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Aldo Cortesi
re is no general way to detect homoglyphs and "convert them to a normal form". Observe: import unicodedata print repr(unicodedata.normalize("NFC", u"\u2160")) print u"\u2160" print "I" So, a round 0 for reading comprehension this lesson, I'm afra

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Aldo Cortesi
fferent from typos in ASCII. There's no doubt that we'll give > the same answer we've always given for this problem: unit tests, pylint > and pychecker. A typo that can't be detected visually is fundamentally different problem from an ASCII typo, as many people in this thr

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-13 Thread Aldo Cortesi
ters do. There is no doubt that people will accidentally introduce mistakes into their code because of this. > - would you use them if it was possible to do so? in what cases? No. Regards, Aldo -- Aldo Cortesi [EMAIL PROTECTED] http://www.nullcube.com Mob: 0419 492 863 --

Re: Loop exception catching

2006-01-24 Thread Aldo Cortesi
er. Just use "raw_input" instead - it just takes input from a user without evaluating it as a Python expression, and will bring order and predictability to whatever it is you want to do. Cheers, Aldo -- Aldo Cortesi [EMAIL PROTECTED] http://www.nullcube.com Mob: 0419 492 863 -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop exception catching

2006-01-23 Thread Aldo Cortesi
"Please enter only the number beside your choice" > print > x = input("> ") Well, leaving aside the merits of using "input" (which should be avoided at all costs), here's one way to do what you want: while 1: try:

Re: What am i doing Wrong?

2005-09-20 Thread Aldo Cortesi
get. In your case, you probably want something like: def __init__(self, folders = None): if folders is None: self.folders = [] Cheers, Aldo -- Aldo Cortesi [EMAIL PROTECTED] http://www.nullcube.com Off: (02) 9283 1131 Mob: 0419 492 863 -- http://m

Re: Detailed traceback

2005-09-12 Thread Aldo Cortesi
co_filename This will give you the file name and line number. If you want the actual text of the line, you can simply read the information from the file. Cheers, Aldo -- Aldo Cortesi [EMAIL PROTECTED] http://www.nullcube.com Off: (02) 9283 1131 Mob: 0419 492 863 -- http://mail.python.org/mailman/listinfo/python-list

Re: ~ after script filename?

2005-09-06 Thread Aldo Cortesi
I'm using Ubuntu Linux 5.04 (Hoary), and > wrote the script with gedit. It doesn't have anything to do with Python. I'm pretty sure you'll find that the file is created by your editor as a backup or a running store of some kind. Try just editing a random non-python file with t

Re: Function returns a function

2005-09-06 Thread Aldo Cortesi
ead more, the keyword you're looking for is "closure" - a quick search on Google for "python closure" should satisfy your curiosity handily. There is also a neat recipe for inspecting the values kept in the func_closure attribute of function objects directly: http://a

Re: Which is faster?

2005-01-26 Thread Aldo Cortesi
't do the same thing - rstrip will return a copy of your string with any number of trailing '/'es removed. If there aren't any, it will return the string as-is. The string access method will always chop exactly one character off the end. Even though the results for y

Re: inbuilt function buffer()

2005-01-18 Thread Aldo Cortesi
t;, time.time()-start if __name__ == "__main__": main() Cheers, Aldo -- Aldo Cortesi [EMAIL PROTECTED] http://www.nullcube.com Off: (02) 9283 1131 Mob: 0419 492 863 -- http://mail.python.org/mailman/listinfo/python-list

Re: Port blocking

2005-01-10 Thread Aldo Cortesi
HTTP and FTP) so that it can be logged, monitored, tracked, and controlled. This is the strategy I recommend to my clients - the only sensible one in a world of spyware, worms, insecure web browsers and corporate espionage... Cheers, Aldo -- Aldo Cortesi [EMAIL PROTECTED] http://www.nu

Re: file.readlines() - gives me error (bad file descriptor)

2005-01-05 Thread Aldo Cortesi
usly logged information. Try append mode ("a") instead. Cheers, Aldo -- Aldo Cortesi [EMAIL PROTECTED] http://www.nullcube.com Off: (02) 9283 1131 Mob: 0419 492 863 -- http://mail.python.org/mailman/listinfo/python-list