Re: PEP8 79 char max

2013-07-31 Thread Neil Cerutti
, but at a creation cost I personally am unwilling to pay. I'm actually OK with the creation cost, but not the maintenance cost. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with psycopg2, bytea, and memoryview

2013-07-31 Thread Neil Cerutti
to see. x = memoryview(b12345) x.format 'B' x.shape (5,) x == b12345 True My guess is you're getting format I from psycopg2. Hopefully there's a way to coerce your desired B format interpretation of the raw data using psycopg2's API. -- Neil Cerutti -- http://mail.python.org/mailman

Re: PEP8 79 char max

2013-07-31 Thread Neil Cerutti
with csv module) instead. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP8 79 char max

2013-07-31 Thread Neil Cerutti
On 2013-07-31, Grant Edwards invalid@invalid.invalid wrote: On 2013-07-31, Neil Cerutti ne...@norwich.edu wrote: Besides, after studying The Pragmatic Programmer I removed nearly all the tables from my code and reference them (usually with csv module) instead. I don't understand. That just

Re: Editing tabular data [was: PEP8 79 char max]

2013-07-31 Thread Neil Cerutti
meddling. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP8 79 char max

2013-07-31 Thread Neil Cerutti
On 2013-07-31, Grant Edwards invalid@invalid.invalid wrote: On 2013-07-31, Neil Cerutti ne...@norwich.edu wrote: On 2013-07-31, Grant Edwards invalid@invalid.invalid wrote: On 2013-07-31, Neil Cerutti ne...@norwich.edu wrote: Besides, after studying The Pragmatic Programmer I removed nearly

Re: Editing tabular data [was: PEP8 79 char max]

2013-08-01 Thread Neil Cerutti
is irrelevant, though I do like receiving an exception when Admissions tries to sneak in a new attribute without telling me. If I instead had a function that handled only the interesting attributes it might be pretty small. I'll have to think on this. -- Neil Cerutti -- http://mail.python.org/mailman

Re: Best practice for connections and cursors

2013-08-01 Thread Neil Cerutti
, but maybe I'll want to someday. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python 'enable' poke and hope programming?

2013-08-01 Thread Neil Cerutti
certain things, even big things, in a Python program is often much easier than changing something in , say, a C program, due to Duck-Typing and dynamic typing. So experimentation is easier thanks to more maleable code. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Simulate `bash` behaviour using Python and named pipes.

2013-08-05 Thread Neil Cerutti
to and reading from a temp file. You'll have to create the temp file and manage attaching processes to it yourself. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Enum vs OrderedEnum

2013-08-07 Thread Neil Cerutti
?irradiated?. Hope the game goes well :-) It's actually a reimplementation of a game from 1993, so I'm somewhat stuck with the terminology. I haven't played MOO1 for at least a month. :) -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: right adjusted strings containing umlauts

2013-08-08 Thread Neil Cerutti
of byte strings, e.g., u -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: c# async, await

2013-08-22 Thread Neil Cerutti
://twistedmatrix.com/trac/ -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: How to send broadcast IP address to network?

2013-08-23 Thread Neil Cerutti
not the same traceback you get. Furthermore, port isn't defined either. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: PEPs should be included with the documentation download

2013-08-23 Thread Neil Cerutti
to be quite high, but it's not an unreasonable question. I use the compiled html/windows help and the integrated with the interpreter html version of the Python docs, both downloaded and installed for easy access. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Python variable as a string

2013-08-23 Thread Neil Cerutti
= dict() if condition: anotherdict[akey] = adict['var'] anotherdict[akey] = adict[str(var)] Will actually work, though you might prefer: anotherdict[akey] = adict[''.join(var)] Try them out and see. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Checking homogeneity of Array using List in Python

2013-08-26 Thread Neil Cerutti
it into int and Accept. Else, I would like to skip that input. eg. my input is ['1', ' ', 'asdasd231231', '1213asasd', '43242'] I want it to be interpreted as: [1, [None], [None], [None], 43242] NOTE: NO INBUILT FUNCTION BE USED. Impossible. I think. -- Neil Cerutti -- http

Re: Checking homogeneity of Array using List in Python

2013-08-27 Thread Neil Cerutti
On 2013-08-26, Joshua Landau jos...@landau.ws wrote: On 26 August 2013 14:49, Neil Cerutti ne...@norwich.edu wrote: On 2013-08-25, sahil301...@gmail.com sahil301...@gmail.com wrote: eg. my input is ['1', ' ', 'asdasd231231', '1213asasd', '43242'] I want it to be interpreted as: [1, [None

Re: New VPS Provider needed

2013-08-27 Thread Neil Cerutti
understand how this savant at anti-killfile-fu can't otherwise manage his server. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: New VPS Provider needed

2013-08-27 Thread Neil Cerutti
this a very unpleasant environment, and sets the tone of the community, badly. I limit myself to one snide remark every time he escapes my killfile. 'Cause I wish he would stop. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: String splitting with exceptions

2013-08-28 Thread Neil Cerutti
))) ['foo.[DOM]', '', '[IP6::4361:6368:6574]', '600', ''] It'll gag on nested brackets (fixable with a counter) and has no error handling (requires thought), but it's a start. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: String splitting with exceptions

2013-08-28 Thread Neil Cerutti
at the end. I wondered that. Good point. My little parser fails on that, too. It'll miss *all* final fields. My parser needs if s: yield s[b:] at the end, to operate like str.split, where the empty string is special. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: python script to gather file links into textfile

2013-08-30 Thread Neil Cerutti
On 2013-08-30, david.d...@gmail.com david.d...@gmail.com wrote: Hi, im looking for someone who can make a script that gathers all file links from an url into a textfile, like this : http://pastebin.com/jfD31r1x Michael Jackson advises you to start with the man in the mirror. -- Neil Cerutti

sax.handler.Contenthandler.__init__

2013-08-30 Thread Neil Cerutti
.__init__ isn't empty, so the above code could fail if the parser isn't prepared for _locator to be undefined. Is the above code is an acceptable idiom? -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: semicolon at end of python's statements

2013-09-03 Thread Neil Cerutti
', 'w')) It ain't beautiful, but it unfolds the nesting and gets rid of the with statement's line-wrap problems. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: semicolon at end of python's statements

2013-09-03 Thread Neil Cerutti
On 2013-09-03, Neil Cerutti ne...@norwich.edu wrote: 3.2 and above provide contextlib.ExitStack, which I just now learned about. with contextlib.ExitStack() as stack: _in = stack.enter_context(open('some_file')) _out = stack.enter_context(open('another_file', 'w')) It ain't

Re: Could someone please paraphrase this statement about variables and functions in Python?

2013-09-05 Thread Neil Cerutti
referring to things like scope, pass-by-value, references, probably the call stack, etc., but it is written extremely poorly. Translation please? Thanks! I don't think that's a fair criticism, but it might be too technical for a language tutorial. -- Neil Cerutti -- https://mail.python.org

Re: Newbie question related to Boolean in Python

2013-09-05 Thread Neil Cerutti
not compile like that. There may be indentation errors, but I don't want to make assumptions when the indentation is definitely not what your real code says. Can you cut and paste your code directly instead of retyping it? -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP8 79 char max

2013-09-06 Thread Neil Cerutti
? -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: how to trouble shoot - RuntimeError: Open Failed

2013-09-06 Thread Neil Cerutti
better if you show some of your code; a minimal cut-down version that exhibits the error is ideal. Are you literally getting a RuntimeError? That would be weird. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Language design

2013-09-11 Thread Neil Cerutti
= elts[0] I'm confused. Your rewrite looks like an assertion error or an IndexError. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Language design

2013-09-12 Thread Neil Cerutti
: Dictionaries should iterate over their items instead of their keys. Looking forward to contrary opinions. Consider the 'in' operator. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Language design

2013-09-12 Thread Neil Cerutti
)(7, 7.0) True -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-13 Thread Neil Cerutti
but I thought that was over a long time ago. To strip NULs off the end of the string use s.rstrip('\0') Hm, that gives me a Type str doesn't support the buffer API message. Type mismatch. Try: s.rstrip(b\0) -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Python GUI?

2013-09-13 Thread Neil Cerutti
last words that were entered in his .blog were: GUI Builders are for chumps, Lord, Lord! Those GUI builders are for chumps. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Language design

2013-09-18 Thread Neil Cerutti
out on a single line with slashes to divide lines: There's lots of poetry with significant indentation, though. Imbuing the shape of the text on the page with significance is a thing. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Language design

2013-09-18 Thread Neil Cerutti
On 2013-09-18, Chris Angelico ros...@gmail.com wrote: On Thu, Sep 19, 2013 at 12:57 AM, Neil Cerutti ne...@norwich.edu wrote: There's lots of poetry with significant indentation, though. Imbuing the shape of the text on the page with significance is a thing. And you can do that with C code

Re: Language design

2013-09-18 Thread Neil Cerutti
On 2013-09-18, wxjmfa...@gmail.com wxjmfa...@gmail.com wrote: 1and 0 0 'a'or 1 'a' 5if True else 999 5 Curse you, FSR! Oh, wait... -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-19 Thread Neil Cerutti
or a screenshot or what. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Sphinx Doctest: test the code without comparing the output.

2013-09-23 Thread Neil Cerutti
from examining the result in the next doctest and making yourself happy about it. x = input(indeterminate:) result = '{}'.format(x)) result.startswith(') and result.endswith(') True -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Sphinx Doctest: test the code without comparing the output.

2013-09-23 Thread Neil Cerutti
On 2013-09-23, Neil Cerutti ne...@norwich.edu wrote: Perhaps try the advanced API and define your oen OutputChecker to add the feature that you need. Figuring out how to best invoke doctest with your modified OutputChecker will take some digging in the source, probably looking

Re: Sphinx Doctest: test the code without comparing the output.

2013-09-23 Thread Neil Cerutti
will take some digging in the source, probably looking at doctest.testmod. I don't see an example in the docs. Hope these examples helped to understand better what my problem is. Yes, I think it's well-defined now. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: What's the best way to extract 2 values from a CSV file from each row systematically?

2013-09-23 Thread Neil Cerutti
, an example: 0,0,KGD,0,DME,0,,0,0 The values I want to extract are KGD and DME (columns 3 and 5). Use the csv module. http://docs.python.org/2/library/csv.html -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Newline interpretation issue with MIMEApplication with binary data, Python 3.3.2

2013-09-26 Thread Neil Cerutti
putting a raw CR in a binary chunk maybe be intolerable, and you need to use a different encoder. But I'm out of my element. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding how is a function evaluated using recursion

2013-09-26 Thread Neil Cerutti
. CPython has a limited number of stack frames though, so the version above might be preferable for certain levels of nesting. [1] http://en.wiktionary.org/wiki/bikeshed -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding how is a function evaluated using recursion

2013-09-26 Thread Neil Cerutti
On 2013-09-26, Neil Cerutti ne...@norwich.edu wrote: def flatten(seq): [1] http://en.wiktionary.org/wiki/bikeshed In that spirit, it occurs to me that given current Python nomenclature, 'flattened' would be a better name. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python

Re: How to write in to already opened excel file by using openpyxl

2013-09-27 Thread Neil Cerutti
describe the error more fully. What did you hope to happen, and what happened instead? What have you tried so far? -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: unable to read combo boxes in excel by xlrd package in python

2013-09-27 Thread Neil Cerutti
was used instead. That would leave the cell contents blank when read, as above. You will need to retrieve the value from the combo-box object directly somehow. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: unable to read combo boxes in excel by xlrd package in python

2013-09-27 Thread Neil Cerutti
On 2013-09-27, Neil Cerutti ne...@norwich.edu wrote: On 2013-09-27, somesh g somes...@gmail.com wrote: Hi..there I want to read the combo box in excel by using xlrd but in the output it is showing empty message, its not reading the combo box can u guys help me how to read the combo box

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Neil Cerutti
, but I just want to shove the food directly into my stomach. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Handling 3 operands in an expression without raising an exception

2013-09-30 Thread Neil Cerutti
? I'm going to go out on a limb and suggest that such a suggestion is outside what people generally consider acceptable on this list. It's reassuring that even a guy like Nikos has his White Knights. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Handling 3 operands in an expression without raising an exception

2013-09-30 Thread Neil Cerutti
of a mosquito. B! BzZ! -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Functional Programming and python

2013-09-30 Thread Neil Cerutti
complex functions defined just before that and referenced instead. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Functional Programming and python

2013-10-01 Thread Neil Cerutti
On 2013-10-01, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 30 Sep 2013 18:36:28 +, Neil Cerutti quoted: Why can??t lambda forms contain statements? Gah! Please fix your news client! (I see you're using slrn.) The \x92 bytes found in your message

Re: JUST GOT HACKED

2013-10-02 Thread Neil Cerutti
you might killfile them. But actual *plonks* are, I think, manifestation of spotlight syndrome. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Rounding off Values of dicts (in a list) to 2 decimal points

2013-10-02 Thread Neil Cerutti
[k] = round(v, 2) return Bare returns are not usual at the end of Python functions. Just let the function end; it returns None either way. Only return when you've got an interesting value to return, or when you need to end execution of the function early. -- Neil Cerutti -- https

Re: Tail recursion to while iteration in 2 easy steps

2013-10-03 Thread Neil Cerutti
possible without breaking Python's assumptions. In any case it's so easy to implement yourself I'm not sure there's any point. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Rounding off Values of dicts (in a list) to 2 decimal points

2013-10-03 Thread Neil Cerutti
to convert them to strings yourself before submitting them, by using % formatting or str.format. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Re for Apache log file format

2013-10-08 Thread Neil Cerutti
+ (?Phttpcode\d{3})\s+ (?Psize\d+)\s+ (?Preferrer\\)\s+ (?Pagent\((.*?)\)), re.VERBOSE) -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Encoding of surrogate code points to UTF-8

2013-10-08 Thread Neil Cerutti
, though not without some disadvantages. In any case, \ud800\udc01 isn't a valid unicode string. In a perfect world it would automatically get converted to '\u00010001' without intervention. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Encoding of surrogate code points to UTF-8

2013-10-08 Thread Neil Cerutti
On 2013-10-08, Neil Cerutti ne...@norwich.edu wrote: In any case, \ud800\udc01 isn't a valid unicode string. In a perfect world it would automatically get converted to '\u00010001' without intervention. This last paragraph is erroneous. I must have had a typo in my testing. -- Neil Cerutti

Re: Encoding of surrogate code points to UTF-8

2013-10-09 Thread Neil Cerutti
, pay no attention to the person whalopping that dead horse. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: I am never going to complain about Python again

2013-10-10 Thread Neil Cerutti
of the earliest things that turned me on to Python was when I discovered that it uses j as the imaginary unit, not i. All right-thinking people will agree with me on this. On top of the engineering origin, j is more noticeable. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: I am never going to complain about Python again

2013-10-10 Thread Neil Cerutti
On 2013-10-10, MRAB pyt...@mrabarnett.plus.com wrote: On 10/10/2013 16:57, Rotwang wrote: On 10/10/2013 16:51, Neil Cerutti wrote: [...] Mixed arithmetic always promotes to the wider type (except in the case of complex numbers (Ha!)). r == c is equivalent to r == abs(c), which returns

Re: I am never going to complain about Python again

2013-10-10 Thread Neil Cerutti
On 2013-10-10, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Oct 10, 2013 at 11:48 AM, Neil Cerutti ne...@norwich.edu wrote: Woah. I thought I was going by what the docs say: Python fully supports mixed arithmetic: when a binary arithmetic operator has operands of different numeric types

Re: I am never going to complain about Python again

2013-10-10 Thread Neil Cerutti
On 2013-10-10, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 10 October 2013 18:48, Neil Cerutti ne...@norwich.edu wrote: I guess the if appropriate part eluded my eye. When *is* it appropriate? Apparently not during an equal test. 5.0 == abs(3 + 4j) False If the above is genuine

Re: I am never going to complain about Python again

2013-10-11 Thread Neil Cerutti
On 2013-10-11, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 10 Oct 2013 17:48:16 +, Neil Cerutti wrote: 5.0 == abs(3 + 4j) False Did you maybe accidentally rebind abs? If not, what version of Python are you using? Honestly, I think I got my Python term and my

Re: basic maze problem with turtle

2013-10-14 Thread Neil Cerutti
judgment. https://mail.python.org/pipermail/python-list/ -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: skipping __init__ and using exploiting a class member instead

2013-10-21 Thread Neil Cerutti
specialization, for example; you get a generic interface with a decoupled implementation which can be optimized for specific types at need. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Class construction

2013-10-22 Thread Neil Cerutti
Reference 8.7 Class definitions. Here's a link to the 3.3 version of those docs: http://docs.python.org/3.3/reference/compound_stmts.html#class-definitions -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Front-end to GCC

2013-10-22 Thread Neil Cerutti
think) C does. This isn't as great a feature as it seems, since the zero value for some built in types, e.g., map, is unusable without manual construction. In addition, you can't define a zero value for your own types. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Front-end to GCC

2013-10-22 Thread Neil Cerutti
) and you'll see the difference. Ah, that makes sense. Thanks to everyone who corrected my misunderstanding. Well, actually, no it doesn't. I wonder why C specifies such behaviour? Why would you want non-global arrays to be filled with garbage? Fish(enc)ey. -- Neil Cerutti -- https

Re: Python Front-end to GCC

2013-10-22 Thread Neil Cerutti
this grammar? spamgram = spam1, { ', ', more_spam }, '.' spam1 = 'Spam' more_spam = spam, { ', ', spam } spam = 'spam' -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Front-end to GCC

2013-10-22 Thread Neil Cerutti
On 2013-10-22, Piet van Oostrum p...@vanoostrum.org wrote: Neil Cerutti ne...@norwich.edu writes: Context-sensitive grammars can be parse, too. That's not English. Do you mean parsed? Thanks, yes, I meant parsed. But context-sentitive grammars cannot be specified by BNF. Yes. I thought

Re: Python Front-end to GCC

2013-10-22 Thread Neil Cerutti
On 2013-10-22, Mark Lawrence breamore...@yahoo.co.uk wrote: On 22/10/2013 20:27, Neil Cerutti wrote: On 2013-10-22, Piet van Oostrum p...@vanoostrum.org wrote: Neil Cerutti ne...@norwich.edu writes: Context-sensitive grammars can be parse, too. That's not English. Do you mean parsed

Re: Will Python 3.x ever become the actual standard?

2013-10-23 Thread Neil Cerutti
guys dead? -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Will Python 3.x ever become the actual standard?

2013-10-23 Thread Neil Cerutti
. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Cookie fucking problem

2013-10-28 Thread Neil Cerutti
. Yours is not to reason why, Jamison. You've left out the body of the letter! ... Fine. Send it that way, and tell them the body will follow. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Front-end to GCC

2013-10-28 Thread Neil Cerutti
pseudo babel. I think you do him a disservice. I'm pretty sure it's genuine, bona-fide, 24K, dyed-in-the-wool, 99 and 44/100 pure babble. I think it's even better than that... maybe even 28.8K! From my own bailiwick I'd say it's Grade A Medium Amber. -- Neil Cerutti -- https

Re: Cookie fr*cking problem

2013-10-29 Thread Neil Cerutti
On 2013-10-29, Steven D'Aprano st...@pearwood.info wrote: On Mon, 28 Oct 2013 13:20:17 +, Neil Cerutti wrote: On 2013-10-27, Ben Finney ben+pyt...@benfinney.id.au wrote: I have no particular objection to you responding to those instances of bad behaviour that I've omitted. So you

Re: how to avoid checking the same condition repeatedly ?

2013-10-29 Thread Neil Cerutti
that you're willing to trade clarity for it, you shouldn't be using Python in the first place. When you detect a code small, as Wolfgang did, e.g., I'm repeating the same exact test condition in several places, you should not simply ignore it, even in Python. -- Neil Cerutti -- https://mail.python.org

Re: Help with guessing game :D

2013-10-29 Thread Neil Cerutti
programming. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: First day beginner to python, add to counter after nested loop

2013-10-29 Thread Neil Cerutti
-- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: First day beginner to python, add to counter after nested loop

2013-10-29 Thread Neil Cerutti
is not needed. All functions return None if they fall off the end. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Using with open(filename, 'ab'): and calling code only if the file is new?

2013-10-30 Thread Neil Cerutti
clobbering output_csv unless new data is succesfully written. I believe TempDirectory isn't available in Python 2, so some other way of creating that path will be needed, and I'm too lazy to look up how. ;) -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Error Testing

2013-10-31 Thread Neil Cerutti
respect than that characterization accords. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Error Testing

2013-10-31 Thread Neil Cerutti
On 2013-10-31, rusi rustompm...@gmail.com wrote: On Thursday, October 31, 2013 8:50:27 PM UTC+5:30, Neil Cerutti wrote: wrote: This suggests that Pascal went against established practice. This is false. FORTRAN used = and that was a mistake caused by the language being hacked together

Re: telnet problem

2013-11-01 Thread Neil Cerutti
On 2013-11-01, wxj0...@gmail.com wrote: hello every expert, When I use telnetlib to send a command, I meet some troubles, I have read some documents about telnetlib and modify many times, but the script doesn't work all the time. What goes wrong? -- Neil Cerutti -- https

Re: how to find out utf or not

2013-11-05 Thread Neil Cerutti
' is (hopefully) decoded already, but the encoding of 'x' is unknown. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: To whoever hacked into my Database

2013-11-07 Thread Neil Cerutti
:-) Well, maybe the issue is MOOt. Ugh, if only these puns were like CALF-way funny... *dives for cover* Phew! I can't stomach stomach stomach this digression. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: To whoever hacked into my Database

2013-11-07 Thread Neil Cerutti
people and UAs will ignore text after it.) It's '-- ', with a space after, to be precise. But I like it the way he's doing it! His messages are greatly improved from where I'm sitting.. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Adding 'download' column to existing 'visitors' table (as requested)

2013-11-07 Thread Neil Cerutti
by storing the data this way, you are promising yourself that you'll never need to write that query, or at least, you won't need to do it very often. I still don't know why you push me to create an extra table instead. Because it's usually the right thing to do. -- Neil Cerutti -- https

Re: To whoever hacked into my Database

2013-11-08 Thread Neil Cerutti
On 2013-11-08, ru...@yahoo.com ru...@yahoo.com wrote: Just wanted to let you know that not everybody here is an asshole. It is just that assholes, by their nature, are the loudest. Hey man, pass that over! -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: New user's initial thoughts / criticisms of Python

2013-11-11 Thread Neil Cerutti
the real value of a switch is that it seems to be a more natural way of thinking about execution. The caveat to that is most *actual* switch implementations are a mess. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating a function for a directory

2013-11-12 Thread Neil Cerutti
. Since I have to create the data file manually, race conditions seem unlikely. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Batching HTTP requests with httplib (Python 2.7)

2012-09-18 Thread Neil Cerutti
in range(0,5)] service_num_list = list(range(5)) -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Decorators not worth the effort

2012-09-18 Thread Neil Cerutti
On 2012-09-14, Chris Angelico ros...@gmail.com wrote: But then again, who actually ever needs fibonacci numbers? If it should happen that your question is not facetious: http://en.wikipedia.org/wiki/Fibonacci_number#Applications -- Neil Cerutti -- http://mail.python.org/mailman/listinfo

Re: sum works in sequences (Python 3)

2012-09-19 Thread Neil Cerutti
: sum() can't sum strings [use ''.join(seq) instead] -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: sum works in sequences (Python 3)

2012-09-19 Thread Neil Cerutti
(). Are iterables and sequences different enough to warrant posting a bug report? -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: howto handle nested for

2012-09-28 Thread Neil Cerutti
) ... (0, 0) (0, 1) (0, 2) (1, 0) (1, 1) (1, 2) (2, 0) (2, 1) (2, 2) -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

<    3   4   5   6   7   8   9   10   11   12   >