Re: What other languages use the same data model as Python?

2011-05-05 Thread Neil Cerutti
. Arguably, it should not be. But that's the sole purpose of the is operator. You either expose those details, or you don't have an is operator at all. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: What other languages use the same data model as Python?

2011-05-05 Thread Neil Cerutti
On 2011-05-05, Roy Smith r...@panix.com wrote: Of course, C++ lets you go off the deep end with abominations like references to pointers. Come to think of it, C++ let's you go off the deep end in so many ways... But you can do some really cool stuff in the deep end. -- Neil Cerutti -- http

Re: What other languages use the same data model as Python?

2011-05-05 Thread Neil Cerutti
automatically dereference themselves. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: What other languages use the same data model as Python?

2011-05-06 Thread Neil Cerutti
(an interface class containing a pointer to an implementation) with template classes to create type-safe polymorphic types with specializable, decoupled implementations. A Python programmer just feels depressed that anyone could have a need for such innovations, though. ;) -- Neil Cerutti -- http

Re: string formatting

2011-05-06 Thread Neil Cerutti
switch to .format you'll probably reap some benefit. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a graph image

2011-05-13 Thread Neil Cerutti
://www.pythonware.com/products/pil/. The technique is necessary in The Python Challenge, for example. URL:http://www.pythonchallenge.com/ -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-26 Thread Neil Cerutti
its author. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: The worth of comments

2011-05-31 Thread Neil Cerutti
by a bad comment. Perhaps better: def foo(): raise IndexError() -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: how to avoid leading white spaces

2011-06-02 Thread Neil Cerutti
, when they're sufficent, are usually more efficient. Perl integrated regular expressions, while Python relegated them to a library. There are thus a large class of problems that are best solve with regular expressions in Perl, but str methods in Python. -- Neil Cerutti -- http://mail.python.org

Re: how to avoid leading white spaces

2011-06-03 Thread Neil Cerutti
to making it my last resort. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: how to avoid leading white spaces

2011-06-03 Thread Neil Cerutti
were not used when they would have simplified the code, then I have seen regexes used when a string method or two would have done the same thing. Can you find an example or invent one? I simply don't remember such problems coming up, but I admit it's possible. -- Neil Cerutti -- http

Re: how to avoid leading white spaces

2011-06-06 Thread Neil Cerutti
On 2011-06-06, ru...@yahoo.com ru...@yahoo.com wrote: On 06/03/2011 02:49 PM, Neil Cerutti wrote: Can you find an example or invent one? I simply don't remember such problems coming up, but I admit it's possible. Sure, the response to the OP of this thread. Here's a recap, along with two

Re: how to avoid leading white spaces

2011-06-06 Thread Neil Cerutti
On 2011-06-06, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Jun 6, 2011 at 10:08 AM, Neil Cerutti ne...@norwich.edu wrote: import re print(re solution) with open(data.txt) as f: ? ?for line in f: ? ? ? ?fixed = re.sub(r(TABLE='\S+)\s+', r\1', line) ? ? ? ?print(fixed, end='') print(non

Re: how to avoid leading white spaces

2011-06-06 Thread Neil Cerutti
to be there. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Function call arguments in stack trace?

2011-06-07 Thread Neil Cerutti
of: Traceback (most recent call last): File bar.py, line 123, in foo build_rpms() The stack trace would read: Traceback (most recent call last): File bar.py, line 123, in foo(1, [2]) build_rpms() This would save a lot of debugging time! Use pdb. -- Neil

Re: Function call arguments in stack trace?

2011-06-07 Thread Neil Cerutti
On 2011-06-07, Dun Peal dunpea...@gmail.com wrote: On Jun 7, 1:23?pm, Neil Cerutti ne...@norwich.edu wrote: Use pdb. Neil, thanks for the tip; `pdb` is indeed a great debugging tool. Still, it doesn't obviate the need for arguments in the stack trace. For example: 1) Arguments in stack

Re: Python Regular Expressions

2011-06-22 Thread Neil Cerutti
. It decouples deciphering the meaning of the data from emitting the data, which is more robust and expansable. The amount of ingenuity required is less, though. ;) -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Can global variable be passed into Python function?

2014-02-28 Thread Neil Cerutti
statement for an example of what it might look like in Python. Except you'd get it without labeled break or the fallthrough statement. Would you still want to use it? -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: References, and avoiding use of ???variable??? (was: Can global variable be passed into Python function?)

2014-02-28 Thread Neil Cerutti
of the called function. Am I oversimplifying? -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: How security holes happen

2014-03-05 Thread Neil Cerutti
underestimated how much we like to use our programming languages as non-RPN calculators. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Closure/method definition question for Python 2.7

2014-03-11 Thread Neil Cerutti
. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: golang OO removal, benefits. over python?

2014-03-11 Thread Neil Cerutti
is a draw. Go's tools are pretty awesome, and are scheduled for improvements. If you can get by with its built in types (or simple aggregates of them) it feels quite expressive. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Using query parameters subtitution outside of execute()

2014-03-28 Thread Neil Cerutti
manageable that the ones I used in Python ... C could provide more friendly general purpose containers in its library, but doesn't. There are some good free ones: glib, for example. Cython provides a really nice in-between level. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread Neil Cerutti
buttons below far making changes to them. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: How to: Coordinate DictReader and Reader for CSV

2011-11-21 Thread Neil Cerutti
data['2'] print data['3'] print data['4'] [...] -- Neil Cerutti This room is an illusion and is a trap devisut by Satan. Go ahead and dauntlessly! Make rapid progres! --Ghosts 'n Goblins -- http://mail.python.org/mailman/listinfo/python-list

Re: How to: Coordinate DictReader and Reader for CSV

2011-11-21 Thread Neil Cerutti
in fields}) for record in reader: # Change a few fields # [...] writer.writerow(record) -- Neil Cerutti This room is an illusion and is a trap devisut by Satan. Go ahead and dauntlessly! Make rapid progres! --Ghosts 'n Goblins -- http://mail.python.org/mailman

Re: How to: Coordinate DictReader and Reader for CSV

2011-11-21 Thread Neil Cerutti
On 2011-11-21, Neil Cerutti ne...@norwich.edu wrote: On 2011-11-21, ray r...@aarden.us wrote: Is there a way to capture the keys outside of the for loop so when the for loop is entered, only data is extracted? I have sometimes done the following type of thing, since DictReader doesn't offer

Re: correct usage of a generator?

2011-11-28 Thread Neil Cerutti
) as the_next_file: ... My Python 3.0 is rusty, so sorry if I messed that up. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Neil Cerutti
conspiracy interpretation of Python's lambda expressions. They were added but grudgingingly, made weak on purpose to discourage their use. -- Neil Cerutti This room is an illusion and is a trap devisut by Satan. Go ahead and dauntlessly! Make rapid progres! --Ghosts 'n Goblins -- http

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Neil Cerutti
On 2011-11-28, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Neil Cerutti wrote: I've always held with the anti-functional style conspiracy interpretation of Python's lambda expressions. They were added but grudgingingly, made weak on purpose to discourage their use. Seems to me

Re: Total newbie question: Best practice

2011-11-29 Thread Neil Cerutti
. The resultant refactored programs are much easier to test, read and maintain. TLDR: Called-only-once functions like main are useful as documentation, hooks for testing, and for unraveling a snarl of global variables. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions about LISP and Python.

2011-12-07 Thread Neil Cerutti
On 2011-12-07, Terry Reedy tjre...@udel.edu wrote: It does not pretend that surrounding statements with parentheses turns them into expressions. ;-) I like being in a sexpression. Aww YEH! -- (Neil Cerutti) -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting the current directory path and the path where python script is saved

2011-12-13 Thread Neil Cerutti
(sys.argv[0]). -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Quick intro to C++ for a Python and C user?

2011-12-20 Thread Neil Cerutti
point for learning pointers, though since you already know C that won't do you as much good. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Quick intro to C++ for a Python and C user?

2011-12-21 Thread Neil Cerutti
and be pretty happy with the results. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Quick intro to C++ for a Python and C user?

2011-12-21 Thread Neil Cerutti
On 2011-12-21, Grant Edwards invalid@invalid.invalid wrote: On 2011-12-21, Neil Cerutti ne...@norwich.edu wrote: On 2011-12-20, Paul Rubin no.email@nospam.invalid wrote: Grant Edwards invalid@invalid.invalid writes: Oops. I should have mentioned this is for embedded systems programming so

Re: [OT] Quick intro to C++ for a Python and C user?

2011-12-22 Thread Neil Cerutti
other language. ;) -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: what does 'a=b=c=[]' do

2011-12-23 Thread Neil Cerutti
On 2011-12-23, Neil Cerutti ne...@norwich.edu wrote: Is the misfeature that Python doesn't evaluate the default argument expression every time you call the function? What would be the harm if it did? ...you know, assuming it wouldn't break existing code. ;) -- Neil Cerutti -- http

Re: what does 'a=b=c=[]' do

2011-12-23 Thread Neil Cerutti
claiming multiple inheritence was a bug and asking it to be removed. Both of these could arguably be called misfeaures, but not bugs. Is the misfeature that Python doesn't evaluate the default argument expression every time you call the function? What would be the harm if it did? -- Neil Cerutti

Re: Early and late binding [was Re: what does 'a=b=c=[]' do]

2011-12-23 Thread Neil Cerutti
On 2011-12-23, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 23 Dec 2011 13:13:38 +, Neil Cerutti wrote: On 2011-12-23, Neil Cerutti ne...@norwich.edu wrote: Is the misfeature that Python doesn't evaluate the default argument expression every time you call

Re: .format vs. %

2012-01-03 Thread Neil Cerutti
the name lookups. ... outfil_write = outfil.write append_newline = {}\n.format ... outfil_write(append_newline(t)) ... -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: .format vs. %

2012-01-03 Thread Neil Cerutti
On 2012-01-03, Stefan Krah stefan-use...@bytereef.org wrote: Neil Cerutti ne...@norwich.edu wrote: In the real-world telco benchmark for _decimal, replacing the single line outfil.write(%s\n % t) with outfil.write({}\n.format(t)) adds 23% to the runtime. I think

Re: .format vs. %

2012-01-03 Thread Neil Cerutti
On 2012-01-03, Neil Cerutti ne...@norwich.edu wrote: On 2012-01-03, Stefan Krah stefan-use...@bytereef.org wrote: Neil Cerutti ne...@norwich.edu wrote: In the real-world telco benchmark for _decimal, replacing the single line outfil.write(%s\n % t) with outfil.write

Re: python philosophical question - strong vs duck typing

2012-01-03 Thread Neil Cerutti
, but only once. The C++ implementation starts to smell sort of like Python. ;) -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: .format vs. %

2012-01-03 Thread Neil Cerutti
, best of 3: 0.965 usec per loop C:\WINDOWSpython -m timeit -n 100 -s n=7.92 '{}'.format(n) 100 loops, best of 3: 1.17 usec per loop -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: replacing __dict__ with an OrderedDict

2012-01-09 Thread Neil Cerutti
, then it should be challenged. The possible broken-nose of a questioner is a small price to pay for the education of the peanut gallery. If a questioner does not wish to defend what they are doing, he or she has that right, of course. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: contextlib.contextmanager and try/finally

2012-01-11 Thread Neil Cerutti
generator in an object with __enter__ and __exit__ methods for you. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: copy on write

2012-01-13 Thread Neil Cerutti
=, operator+, and operator+= in C++ you'll know how and why they are different. A C++ programmer would be wondering how either can work on immutable objects, and that's where Python's magical rebinding semantics come into play. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: copy on write

2012-01-13 Thread Neil Cerutti
Python or Pike. (With apologies to Larry Wall) Were one inclined to troll a bit, one might be tempted to claim that using C++ is prima facie evidence of not understanding C++. Not that I would ever claim something inflamitory like that... On the Python newsgroup, it's funny. ;) -- Neil Cerutti

Re: copy on write

2012-01-13 Thread Neil Cerutti
On 2012-01-13, Evan Driscoll edrisc...@wisc.edu wrote: On 01/13/2012 10:54 AM, Neil Cerutti wrote: If you've ever implemented operator=, operator+, and operator+= in C++ you'll know how and why they are different. At the same time, you'd also know that that implementing them in such a way

Re: Distributing methods of a class across multiple files

2012-01-25 Thread Neil Cerutti
presented, the latter two leave very strong coupling between the code in your separate files. This makes working with the files independently impractical. Stick with mixin classes and pay heed to the Law of Demeter if you want to de-couple them enough to work on independently. -- Neil Cerutti -- http

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-25 Thread Neil Cerutti
insist on QUANTIFYING a QUANTIFIER, simply use any number of legal QUANTIFIERS. I think XYZ is VERY easy or I think XYZ is SOMEWHAT easy or I think XYZ is difficult. I remind you of http://orwell.ru/library/essays/politics/english/e_polit -- Neil Cerutti -- http://mail.python.org/mailman

Re: PyPI - how do you pronounce it?

2012-01-30 Thread Neil Cerutti
pronunciation of Beauchamp created a minor incident at Yeoman of the Guard auditions this weekend. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: PyPI - how do you pronounce it?

2012-01-30 Thread Neil Cerutti
On 2012-01-30, Chris Angelico ros...@gmail.com wrote: On Mon, Jan 30, 2012 at 11:12 PM, Neil Cerutti ne...@norwich.edu wrote: The British pronunciation of Beauchamp created a minor incident at Yeoman of the Guard auditions this weekend. What about Sir Richard Chumley, the Left Tenant

Re: Cycle around a sequence

2012-02-08 Thread Neil Cerutti
' i = n - len(seq) while i n: yield seq[i] i += 1 if __name__ == __main__: import doctest doctest.testmod() If you have merely an iterable instead of a sequence, then look to some of the other clever stuff already posted. -- Neil Cerutti -- http://mail.python.org

Re: Formate a number with commas

2012-02-09 Thread Neil Cerutti
, slicker, more proper, pythonic ways to do this. I think you've found an excellent way to do it. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Undoing character read from file

2012-02-17 Thread Neil Cerutti
of characters you'd like to be able to put back. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Neil Cerutti
and that constant will ALWAYS be larger! What's the point of that? The only time I've naively pined for such a thing is when misapplying C idioms for finding a minimum value. Python provides an excellent min implementation to use instead. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-27 Thread Neil Cerutti
do. A truncated string with a maxlength of INFINITY is just a string. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Decoding unicode is not supported in unusual situation

2012-03-09 Thread Neil Cerutti
and then decode, rather than try to encode a non-encoded str. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Software Engineer -

2012-03-13 Thread Neil Cerutti
for jobs have to delete them. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is readable

2012-03-16 Thread Neil Cerutti
the seemingly random way in which we apply articles to our nouns. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is readable

2012-03-16 Thread Neil Cerutti
instructions. A sequence of instructions is an algorithm, program or routine. You may have heard of them :) A grammarian always uses complete sentence before a colon, even when introducing a list. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is readable

2012-03-16 Thread Neil Cerutti
the grammatical rules used by people in real life. You know the ones: linguists. My mistake. I am not pedantic. You are wrong. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is readable

2012-03-16 Thread Neil Cerutti
On 2012-03-16, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 16 Mar 2012 17:53:24 +, Neil Cerutti wrote: On 2012-03-16, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Ah, perhaps you're talking about *prescriptivist* grammarians, who insist on applying

Re: Python is readable

2012-03-19 Thread Neil Cerutti
On 2012-03-17, Terry Reedy tjre...@udel.edu wrote: On 3/16/2012 9:08 AM, Neil Cerutti wrote: A grammarian always uses complete sentence before a colon, even when introducing a list. The Chicago Manual of Style*, 13th edition, says The colon is used to mark a discontinuity of grammatical

Re: Python is readable

2012-03-19 Thread Neil Cerutti
On 2012-03-19, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 19 Mar 2012 11:26:10 +, Neil Cerutti wrote: [...] *A major style guide for general American writing and publication: used by some as the 'Bible'. Thanks for the discussion and corrections. My apologies

A debugging story.

2012-03-19 Thread Neil Cerutti
seconds. This message brought to you by the Debugging is Mostly Comprehending Old Code and Testing Council. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing the files by last modified time

2012-03-22 Thread Neil Cerutti
to work. It may be a simple case of just different aspects the exact same type being being highlighted in each definition. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: convert string to bytes without changing data (encoding)

2012-03-28 Thread Neil Cerutti
hypothetical implementation doesn't mean I can never say anything about it. I am in a similar situation viz a viz my wife's undergarments. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Python why questions

2010-08-22 Thread Neil Cerutti
7. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Fibonacci: How to think recursively

2010-09-01 Thread Neil Cerutti
i n: fibminus2, fibminus1 = fibminus1, fibminus2 + fibminus1 i += 1 return fibminus2 + fibminus1 It's interesting that the loop iterative solution is, for me, harder to think up without doing the tail-recursive one first. -- Neil Cerutti -- http

Re: That interesting notation used to describe how long a loop will take.

2010-10-04 Thread Neil Cerutti
. The web version of the book Data Structures and Algorithms with Object-Oriented Design Patterns in Python contains a an explanation in the chapters Algorithm Analysis and Asymptotic Notation. http://www.brpreiss.com/books/opus7/ -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python

Re: Using csv.DictReader with \r\n in the middle of fields

2010-10-13 Thread Neil Cerutti
(record_re, m.group(6), flags=re.M | re.S) for record in parse_file('45.txt'): print(record) -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows binary stdin goes EOF after \x1a character

2010-10-15 Thread Neil Cerutti
. Try invoking with -u option. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows binary stdin goes EOF after \x1a character

2010-10-15 Thread Neil Cerutti
of the text. Try adding the -u option (unbuffered) to Python's command line: pythonw.exe -u main.pyw To expound a bit, using a windows-only module you can switch the mode of stdin. import sys import msvcrt msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) -- Neil Cerutti -- http

Re: Classes in a class: how to access variables from one in another

2010-10-18 Thread Neil Cerutti
: Class A: Class B: x = 2 or Class A: Class B: def __init__(self): self.x = 2 -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Classes in a class: how to access variables from one in another

2010-10-18 Thread Neil Cerutti
On 2010-10-18, Neil Cerutti ne...@norwich.edu wrote: On 2010-10-18, f...@slick.airforce-one.org f...@slick.airforce-one.org wrote: Hello. I have a class A that contains two classes B and C: class A: class B: self.x = 2 class C: Is there a way to access the x defined in B

Re: how to scrutch a dict()

2010-10-21 Thread Neil Cerutti
to cirrhossis of the dictionary. Here's another idea: for k in [k for k, v in d.items() if v is None]: del d[k] -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: pylint -- should I just ignore it sometimes?

2010-10-21 Thread Neil Cerutti
the bigger the scope of a variable, the longer and more descriptive should be its name. In a small scope, a big name is mostly noise. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: pylint -- should I just ignore it sometimes?

2010-10-21 Thread Neil Cerutti
be included. Beginner mistakes like, define a class to model birds, and, # increment the total, are worse than empty space. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Python changes

2010-10-28 Thread Neil Cerutti
. Your books are indeed useless. Python's documentation contains an excellent summary of new features and changes dating back to Python 2.0. http://docs.python.org/py3k/whatsnew/index.html -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Neil Cerutti
On 2010-11-01, Martin v. Loewis mar...@v.loewis.de wrote: i.e. avoid the backslash for multi-line conditions altogether (in fact, I can't think any situation where I would use the backslash). The horrible-to-nest with statement. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo

Re: playful coding problems for 10 year olds

2010-11-02 Thread Neil Cerutti
,is_palindrom, pig_latin, and so forth might make good Python exercises, too. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Allowing comments after the line continuation backslash

2010-11-03 Thread Neil Cerutti
than Victorian. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Compare source code

2010-11-04 Thread Neil Cerutti
of certain constructs. if x: print(x) elif y: print(y) else: print() versus if x print(x) elif y print(y) else print() Beauty-is-in-the-eye-of-the-BDFLly-yours, -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Compare source code

2010-11-04 Thread Neil Cerutti
is fairly easy in Python. Auto-dedent is the impossible part. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Compare source code

2010-11-04 Thread Neil Cerutti
On 2010-11-04, Grant Edwards inva...@invalid.invalid wrote: On 2010-11-04, Neil Cerutti ne...@norwich.edu wrote: On 2010-11-04, D'Arcy J.M. Cain da...@druid.net wrote: * Not being able to write an auto-indenter, ever, because it is by design theoretically impossible: Annoying. Right

Re: What is the best way to handle a missing newline in the following case

2010-11-05 Thread Neil Cerutti
strictly legal. You can expect problems, or at least warnings, with other tools with such files. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Allowing comments after the line continuation backslash

2010-11-08 Thread Neil Cerutti
. ;) -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Compare source code

2010-11-08 Thread Neil Cerutti
On 2010-11-07, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 8jftftfel...@mid.individual.net, Neil Cerutti wrote: The handsome ':' terminator of if/elif/if statements allows us to omit a newline, conserving vertical space. This improves the readability of certain

Re: Compare source code

2010-11-09 Thread Neil Cerutti
. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-12 Thread Neil Cerutti
in Python. The determined Real Programmer can write Fortran programs in any language. They probably won't run quite as as fast, though. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: another newbie question

2010-11-15 Thread Neil Cerutti
it, but as a Vim user I can't partake. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: The end to all language wars and the great unity API to come!

2011-07-06 Thread Neil Cerutti
with the Chaotic Neutrals. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Lisp refactoring puzzle

2011-07-12 Thread Neil Cerutti
, not in lisps. In Common Lisp you have: CL-USER (union '(a b c) '(b c d)) (A B C D) CL-USER (intersection '(a b c) '(b c d)) (C B) What's the rationale for providing them? Are the definitions obvious for collections that a not sets? -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Neil Cerutti
# # and ornate is a huge time-waster if# # you let it get the best of you. # ##-**-##-**-##-**-##-**-##-**-##-**-##-**-##-**-## -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 8 and extraneous whitespace

2011-07-22 Thread Neil Cerutti
in programming?! Under the assumption that leading white space is important for code formatting, but that all alignment after that is unimportant. Peek at Stroustrup's writing for examples. It really doesn't take much time at all to get used to it. -- Neil Cerutti -- http://mail.python.org/mailman

Re: PEP 8 and extraneous whitespace

2011-07-22 Thread Neil Cerutti
On 2011-07-22, Ian Kelly ian.g.ke...@gmail.com wrote: On Fri, Jul 22, 2011 at 6:59 AM, Neil Cerutti ne...@norwich.edu wrote: Under the assumption that leading white space is important for code formatting, but that all alignment after that is unimportant. ...unless you're trying to adhere

Re: PEP 8 and extraneous whitespace

2011-07-22 Thread Neil Cerutti
On 2011-07-22, John Gordon gor...@panix.com wrote: In 98u00kfnf...@mid.individual.net Neil Cerutti ne...@norwich.edu writes: You can fit much more code per unit of horizontal space with a proportionally spaced font. As a result, that issue, while valid, is significantly reduced. Is it? I

<    5   6   7   8   9   10   11   12   >