Re: Experiences/guidance on teaching Python as a first programming language

2013-12-11 Thread Ethan Furman
On 12/11/2013 12:34 AM, Devin Jeanpierre wrote: On Tue, Dec 10, 2013 at 2:02 PM, Ethan Furman wrote: Doesn't sound like they do, as that's causing plenty of problems. In today's world that level of knowledge isn't always necessary, especially if your degree is not in C

Re: Tree library - multiple children

2013-12-12 Thread Ethan Furman
f members of the list. Now that you've given some background you may get better answers. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-13 Thread Ethan Furman
His credibility with me has been long dead. :( -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Type of an object:

2013-12-17 Thread Ethan Furman
s__.__name__ = 'some_proxy' --> t.__class__.__name__ 'some_proxy' -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Type of an object:

2013-12-17 Thread Ethan Furman
t obj.__class__ to a class, type(obj) returns the new (external) type. How the hell does it decide which one to return? However it does it, it does it in C. ;) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-18 Thread Ethan Furman
es is false. Only object-oriented languages have *objects*. C does not have objects, it has values. The word 'object' has many more meanings than the one implied by Object Oriented Programming, as you well know. And yes, I'm being pedantic. No, you're being an ass. -- ~Et

Re: cascading python executions only if return code is 0

2013-12-23 Thread Ethan Furman
llion lines of code out there and GBytes of program state, but right here, right now, within this circle I've drawn in the sand, Considering how easy it is to disable assertions, a circle in the sand is an amazingly appropriate metaphor. :) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: cascading python executions only if return code is 0

2013-12-23 Thread Ethan Furman
...] First, the bug: there are circumstances where no exception is raised even if all the strategies fail. Since Steven wasn't explicit about the circumstances, I'll list the two I'm aware of: if Python is started with -O or -OO then assertions are cut from the code and do not r

Re: cascading python executions only if return code is 0

2013-12-23 Thread Ethan Furman
On 12/23/2013 07:10 AM, Roy Smith wrote: In article , Ethan Furman wrote: On 12/22/2013 08:57 PM, Roy Smith wrote: In article <52b7a0e4$0$29994$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: Anyway, I may be completely misinterpreting what I'm read

Re: Blog "about python 3"

2013-12-30 Thread Ethan Furman
r shout at you for sending eyeballs to look at such a pile of steaming bullshit. http://nuitka.net/posts/re-about-python-3.html is a response. Wow -- another steaming pile! Mark, are you going for a record? ;) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Blog "about python 3"

2013-12-30 Thread Ethan Furman
On 12/30/2013 08:25 PM, Devin Jeanpierre wrote: On Mon, Dec 30, 2013 at 2:38 PM, Ethan Furman wrote: Wow -- another steaming pile! Mark, are you going for a record? ;) Indeed. Every post that disagrees with my opinion and understanding of the situation is complete BS and a conspiracy to

Fwd: Mailing list erraticness

2013-12-30 Thread Ethan Furman
Accidental off-list reply. :) On Tue, Dec 31, 2013 at 10:03 AM, Ethan Furman wrote: On 12/30/2013 08:25 PM, Devin Jeanpierre wrote: On Mon, Dec 30, 2013 at 2:38 PM, Ethan Furman wrote: Wow -- another steaming pile! Mark, are you going for a record? ;) Indeed. Every post that

Re: Ifs and assignments

2014-01-02 Thread Ethan Furman
class assign(object): def set(self, value): self._assignment = value return value def get(self): return self._assignment m = assign() if m.set(r1.search(w)): handleMatch1(m.get()) elif m.set(r2.search(w)): handleMatch2(m.get()) else: print("No matc

Re: About some problem

2014-01-02 Thread Ethan Furman
re wrong on this one, the split was simply never noticed by anybody :) Actually, the split was so severe the universe itself noticed and split into two -- one where folks noticed, and one where nobody did... I wonder which one we're in? -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Ifs and assignments

2014-01-02 Thread Ethan Furman
O?) I haven't tested it, but your __new__ looks fine. The only thing you lose by not calling super() is the inability for cooperative multiple inheritance, except as the ultimate base class. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Blog "about python 3"

2014-01-03 Thread Ethan Furman
On 01/03/2014 02:24 AM, Chris Angelico wrote: I worked that out with a sheet of paper and a pencil. The pencil was a little help, but the paper was three sheets in the wind. Beautiful! -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: About some problem

2014-01-03 Thread Ethan Furman
ceptions display a warning but continue to work, and in Python 2.6 they generate a compile-time SyntaxError. Oh? Doesn't look like it. Oh, it's a runtime TypeError, not SyntaxError. The main point being that in 2.6 and 2.7 string exceptions do /not/ work. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] gg_scrapper -- scrapping of the Google Groups

2014-01-05 Thread Ethan Furman
Matěj, Thanks for your efforts! However, you should only have one 'p' in scraping and scraper. ;) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-05 Thread Ethan Furman
ant my implicit conversion of 2 + '3' to get '23' Huh. And here I thought 'twenty-three' was the right answer! ;) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-05 Thread Ethan Furman
really annoying. ;) On the upside adding 'from None' was a small enough project that I was able to get it going, and that was the bridge to eventually becoming a dev. :D -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-05 Thread Ethan Furman
g, but really it's just a bunch of integers: --> b'abc 'b'abc' --> b'abc'[1] 98 Maybe for 3.5 somebody *cough* will make a bytestring type for those of us who have to support the lower-level protocols... -- ~Ethan~ *Cast your vote over on Python Ideas! -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-05 Thread Ethan Furman
easily imagine the nightmare. The most unfortunate aspect is that even if we did "fix" it in 3.5, it wouldn't help any body who has to support multiple versions... unless, of course, a backport could also be made. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Ethan Furman
On 01/05/2014 06:23 PM, Ethan Furman wrote: Using my own project [1] as a reference [1] https://pypi.python.org/pypi/dbf -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Ethan Furman
ascii text, you'd be wrong -- the field names are also encoded, as are the Character and Memo fields. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Ethan Furman
2 did 'abc'[1] return 98. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] Migrating from non-free programs to LibreOffice

2014-01-06 Thread Ethan Furman
/AsciiDoc Thanks for that! -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Ethan Furman
On 01/06/2014 09:27 AM, Steven D'Aprano wrote: Ethan Furman wrote: Chris didn't say "bytes and ascii data", he said "bytes and TEXT". Text != "ascii data", and the fact that some people apparently think it does is pretty much the heart of the problem.

Re: Bytes indexing returns an int

2014-01-07 Thread Ethan Furman
bytearrays) are containers of ints, so indexing returns an int. One big problem with this whole scenario is that bytes then lies about what it contains. (And I hate lies! [1]) Anyway, I believe that's the rationale behind the change. -- ~Ethan~ [1] http://www.quickmeme.com/meme/3ts325

Re: [Python-ideas] RFC: bytestring as a str representation [was: a new bytestring type?]

2014-01-07 Thread Ethan Furman
x27;abc\xFF'.decode('ascii-compatible') That would be: bytestring(b'abc\xFF') Bytes outside the ASCII range would be mapped to Unicode low surrogates: bytestring(b'abc\xFF') == bytestring('abc\uDCFF') Not sure what you mean here. The resulting

Re: Bytes indexing returns an int

2014-01-07 Thread Ethan Furman
On 01/07/2014 04:15 PM, Steven D'Aprano wrote: Ethan Furman wrote: On 01/07/2014 07:19 AM, David Robinow wrote: Python 3 grudgingly allows the "abomination" of byte strings (is that what they're called?) No, that is *not* what they're called. If you find any place

Re: the Gravity of Python 2

2014-01-08 Thread Ethan Furman
ive, you have a mess (temporal-bake, anyone?). -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: the Gravity of Python 2

2014-01-08 Thread Ethan Furman
It looks like the .fromtimestamp also accepts tz=timezone.utc, so perhaps that is the simple way to get the timezone aware datetime. I haven't tested, I'm going to bed. :/ -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: the Gravity of Python 2

2014-01-09 Thread Ethan Furman
into looking after issues. Mark, I hope you are addressing the community at large and not the core-devs. There are only so many of us, with limited time available. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: the Gravity of Python 2

2014-01-09 Thread Ethan Furman
a time_t will cover everything in an ugly way, but that a class wrapping it up could fix that. And fundamentally, the only problem with datetime (which, for the most part, is exactly that wrapper) is that it's unobvious how to get a simple UTC timestamp. It has at least one other problem: bool(

Re: Bytes indexing returns an int

2014-01-09 Thread Ethan Furman
him. His one, minor, contribution has been completely swamped by the rest of his belligerent, unfounded, refuted posts. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: the Gravity of Python 2

2014-01-09 Thread Ethan Furman
On 01/09/2014 10:18 AM, Mark Lawrence wrote: On 09/01/2014 16:01, Ethan Furman wrote: On 01/09/2014 12:42 AM, Mark Lawrence wrote: On 09/01/2014 01:27, Roy Smith wrote: Naive datetimes are what everybody uses. It's what utcnow() gives you. So why make life difficult for everybody? Pyt

Re: the Gravity of Python 2

2014-01-09 Thread Ethan Furman
ammer. With the timezone stuff we're looking for The One Obvious Way, which should be a method, not a recipe. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

unicode troubles and postgres

2014-01-09 Thread Ethan Furman
#x27;t. Further investigation revealed that "py6" is made up of the bytes d1 80 d1 83 d0 b1. Any ideas on what that means, exactly? -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: unicode troubles and postgres [SOLVED]

2014-01-09 Thread Ethan Furman
On 01/09/2014 10:49 AM, Ethan Furman wrote: So I'm working with postgres, and I get a datadump which I try to restore to my test system, and I get this: ERROR: value too long for type character varying(4) CONTEXT: COPY res_currency, line 32, column symbol: "руб" "py6

Re: Python 2.x and 3.x usage survey

2014-01-10 Thread Ethan Furman
lly. A useful data point for why you don't just use bytes on the Python side would be valuable for the discussions currently taking place on PyDev. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Porting mailing list underused?

2014-01-11 Thread Ethan Furman
list can be a help to all wanting to go this (not always smooth :-) way. ENDQUOTE Thanks for finding this mailing list. I have subscribed to it. :) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Python 3 __bytes__ method

2014-01-11 Thread Ethan Furman
Python 3 has a new method, __bytes__. The docs say: Called by bytes() to compute a byte-string representation of an object. This should return a bytes object. I must admit I'm not entirely clear how this should be used. Is anyone using this now? If so, how? -- ~Ethan~ --

Re: Python 3 __bytes__ method

2014-01-11 Thread Ethan Furman
On 01/11/2014 04:53 PM, Daniel da Silva wrote: Where did you read this? I can't find any documentation about __bytes__ on google. http://docs.python.org/3.3/reference/datamodel.html?highlight=__bytes__#object.__bytes__ -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 __bytes__ method

2014-01-11 Thread Ethan Furman
. I don't think so, for two reasons: 1) bytes objects do not have a __bytes__ method, 2) if the function is expecting a bytes object, it is unlikely to call bytes() on it. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 __bytes__ method

2014-01-11 Thread Ethan Furman
On 01/11/2014 08:56 PM, Daniel da Silva wrote: I agree with you that realistic use cases are hard to think of. Does that answer your question better? Well, since I was asking if anybody was already using the feature, no. ;) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: setup.py issue - some files are included as intended, but one is not

2014-01-14 Thread Ethan Furman
On 01/14/2014 01:26 PM, Dan Stromberg wrote: On Sat, Jan 11, 2014 at 2:04 PM, Dan Stromberg wrote: Hi folks. I have a setup.py problem that's driving me nuts. Anyone? I've received 0 responses. I have no answer, but forwarding to Distutils (hopefully it's an appropriate topic ;) I hav

Re: Guessing the encoding from a BOM

2014-01-15 Thread Ethan Furman
On 01/15/2014 07:47 PM, Ben Finney wrote: Steven D'Aprano writes: (4) Don't return anything, but raise an exception. (But which exception?) +1. I'd like a custom exception class, sub-classed from ValueError. +1 -- ~Ethan~ -- https://mail.python.org/mailman/

Re: Guessing the encoding from a BOM

2014-01-15 Thread Ethan Furman
least is usually close to catastrophic in nature [2]. I'd say a ValueError subclass because, while not an strictly an error, it is values you don't know how to deal with. But either that or plain Exception, just not RuntimeError. -- ~Ethan~ [1] http://docs.python.org/3/library/e

Re: Is it possible to protect python source code by compiling it to .pyc or .pyo?

2014-01-16 Thread Ethan Furman
.pyo offer better protection? No and no. Distribute your code with a copyright notice, accept that a few people will rip you off, and have done with it. Yes. One of the nice things about Python is being able to fix bugs myself [1]. -- ~Ethan~ [1] Yes, I file upstream bug reports

Re: Guessing the encoding from a BOM

2014-01-17 Thread Ethan Furman
A BOM!!!" :) Special delivery, a berm! Were you expecting one? Endian detection: Does my BOM look big in this? LOL! -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: question about input() and/or raw_input()

2014-01-19 Thread Ethan Furman
gt; quux1(2.3) '3.3' --> quux2(2.3) Traceback (most recent call last): File "", line 1, in File "", line 1, in quux2 TypeError: hex() argument can't be converted to hex (Will be) fixed in 3.5 [1] :) -- ~Ethan~ [1] Which is to say, both will raise a

Re: question about input() and/or raw_input()

2014-01-19 Thread Ethan Furman
On 01/19/2014 08:38 AM, Chris Angelico wrote: On Mon, Jan 20, 2014 at 3:14 AM, Ethan Furman wrote: --> def quux1(x): return str(x+1) --> quux1(2.3) '3.3' (Will be) fixed in 3.5 [1] :) [1] Which is to say, both will raise an exception. Why would that raise? Sorry, shoul

Re: question about input() and/or raw_input()

2014-01-19 Thread Ethan Furman
On 01/19/2014 10:41 AM, Chris Angelico wrote: On Mon, Jan 20, 2014 at 4:50 AM, Ethan Furman wrote: The difference I was thinking of is: "%h" % 3.14 # this works vs. hex(3.14) # this raises In 3.5 both will raise. Now you have me *thoroughly* intrigued. It's not

Re: Add followers at time of import

2014-01-21 Thread Ethan Furman
ery few members. ;) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Diving in to Python - Best resources?

2014-01-21 Thread Ethan Furman
& YMMV) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: awesome slugify and unicode

2014-01-22 Thread Ethan Furman
On 01/22/2014 11:23 AM, Mark Lawrence wrote: I thought this blog might interest some of you http://pydanny.com/awesome-slugify-human-readable-url-slugs-from-any-string.html Thanks! -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Case insensitive exists()?

2014-01-22 Thread Ethan Furman
, ch.upper())) search = ''.join(new_search) found = glob(search) return bool(found) --- -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: buggy python interpretter or am I missing something here?

2014-01-26 Thread Ethan Furman
y, but under typical circumstances you tell 'except' which exceptions you are prepared to deal with. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: buggy python interpretter or am I missing something here?

2014-01-26 Thread Ethan Furman
On 01/26/2014 10:46 PM, me wrote: [...] I'm satisfied that the except: syntax yields undefined behavior, and in my mind it shouldn't be syntactically allowed then. Two points: 1) Python is not C++ 2) You asked for help; you received it. Coming back with an attitude of "Python mus

Re: Highlighting program variables instead of keywords?

2014-01-27 Thread Ethan Furman
;d replace "find them handy" with "totally addicted to". +1000 -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: UTC "timezone" causing brain explosions

2014-01-29 Thread Ethan Furman
datetime(2014, 1, 29, 22, 9, 56, 494967, tzinfo=) --> s.astimezone(GMT) datetime.datetime(2014, 1, 29, 22, 9, 56, 494967, tzinfo=) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Try-except-finally paradox

2014-01-30 Thread Ethan Furman
finally block doesn't have a return: --> def paradox3(): try: raise Exception("Raise") except: print("Except") return [print("Return"), True][1] finally: print("Finally") return None --> print(paradox3()) Except Return Finally True -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: 1 > 0 == True -> False

2014-01-30 Thread Ethan Furman
On 01/30/2014 11:03 AM, Chris Angelico wrote: On Fri, Jan 31, 2014 at 5:56 AM, Roy Smith wrote: Yes, that's probably how I would write that, although, this is even simpler: (x > -1) and (y >= 5) Be careful; that's not the same thing. How so? -- ~Ethan~ -- https://mail.py

Re: __init__ is the initialiser

2014-01-31 Thread Ethan Furman
ed at runtime. " Should the wording of the above be changed to clearly reflect that we have an initialiser here and that __new__ is the constructor? I would say yes. Go ahead and create an issue if one doesn't already exist. Thanks. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: __init__ is the initialiser

2014-01-31 Thread Ethan Furman
ated but before it is returned. I think that would be much clearer. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: __init__ is the initialiser

2014-01-31 Thread Ethan Furman
s, good point. Also, __init__ initializes so it is a good choice. Ignore the names comment in my previous post. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: __init__ is the initialiser

2014-01-31 Thread Ethan Furman
tor and an initializer), but I found calling __init__ the constructor very confusing. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: __init__ is the initialiser

2014-01-31 Thread Ethan Furman
tance creation, to initialise the new instance. But __new__ does not call __init__, type does [1]. -- ~Ethan~ [1] And I seem to think pickle does, too, but I'm not sure. -- https://mail.python.org/mailman/listinfo/python-list

Re: __init__ is the initialiser

2014-01-31 Thread Ethan Furman
On 01/31/2014 05:10 PM, Roy Smith wrote: In article , Ethan Furman wrote: I found calling __init__ the constructor very confusing. I've heard many people say this, and it's always sort of befuddled me. I have never learned C++, so I don't know its screwy semantics. ;)

Re: __init__ is the initialiser

2014-01-31 Thread Ethan Furman
On 01/31/2014 07:16 PM, Terry Reedy wrote: On 1/31/2014 7:13 PM, Ethan Furman wrote: On 01/31/2014 03:43 PM, Ned Batchelder wrote: On 1/31/14 6:05 PM, Ben Finney wrote: Ned Batchelder writes: I'm not hoping to change any official terminology. I just think that calling __init__ any

Re: __init__ is the initialiser

2014-01-31 Thread Ethan Furman
(or not be) __init__ed). -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: __init__ is the initialiser

2014-01-31 Thread Ethan Furman
on's. Part of the effort is in learning what the terms mean, what the ideology is, the differences, the similarities, etc., etc.. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: __init__ is the initialiser

2014-02-01 Thread Ethan Furman
and being able to further customize with __init__ (where the kitchen goes, how many bedrooms, to follow along with Terry) is quite useful. One of my favorite Enum recipes uses that pattern to have some basic behavior, with some other behavior that is easily overridable/extendable [1]. -- ~

Re: __init__ is the initialiser

2014-02-02 Thread Ethan Furman
ing at the answer change it? No, looking at it is what collapses it. Before that it was just another Schroedinger's cat So, what you're saying is when I delete an object, __del__() has both been called and not been called? That would certainly explain the problems with __del__!

Re: Latest Python 3.4 in the source repo is broken?

2014-02-04 Thread Ethan Furman
On 02/04/2014 07:45 AM, Steven D'Aprano wrote: Before I bother Python-Dev with this, can anyone else confirm that building Python 3.4 from source using the latest version in the source repository fails? This is the check-out I'm using: ethan@media:~/source/python/cpython$

Re: how to reduce bugs due to incorrect indentation

2014-02-06 Thread Ethan Furman
space bar four times for each level of indentation? ;) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Finding size of Variable

2014-02-07 Thread Ethan Furman
On 02/07/2014 06:48 PM, Steven D'Aprano wrote: That is not a trade-off that the core developers have chosen to make, and I agree with them. Even though you haven't broken all the build-bots yet, you can still stop saying "them". ;) -- ~Ethan~ -- https://mail.python.

Re: imperative mood in docstrings

2014-02-09 Thread Ethan Furman
the verb performs. If, on the other hand, I had: Shouldn't that be: class Pig: def fly(self): "Soar gracefully through the air if a hot place is very cold." if hell is frozen: self.sprout_wings() self.altitude += 10 se

Re: Fun with function argument counts

2014-02-11 Thread Ethan Furman
). Might be fairer to remove those from consideration. Not at all. Even private routines get used by somebody! ;) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: [STORY-TIME] THE BDFL AND HIS PYTHON PETTING ZOO

2016-02-19 Thread Ethan Furman
On 02/02/2016 07:26 PM, Rick Johnson wrote: a bunch of garbage. *sigh* Time to update my procmail filters... Anyone know one for deleting all responses to a troll post? -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Make a unique filesystem path, without creating the file

2016-02-22 Thread Ethan Furman
h the file system you have no way to know if the path is unique. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Make a unique filesystem path, without creating the file

2016-02-22 Thread Ethan Furman
On 02/22/2016 02:25 PM, Cameron Simpson wrote: On 22Feb2016 10:11, Ethan Furman wrote: On 02/14/2016 04:08 PM, Ben Finney wrote: I am unconcerned with whether there is a real filesystem entry of that name; the goal entails having no filesystem activity for this. I want a valid unique

Re: "from module import data; print(data)" vs "import module; print(module.data)"

2016-02-25 Thread Ethan Furman
ready done a `from module import data` as those will be unaffected by the rebinding. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: "from module import data; print(data)" vs "import module; print(module.data)"

2016-02-25 Thread Ethan Furman
the module. :) You should also import it before anything else does to make sure your change is visible to all other code. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-02-27 Thread Ethan Furman
On 02/27/2016 01:37 AM, Steven D'Aprano wrote: Although the connection to Python is only quite slim, I found it fascinating to read. Thanks to you and Kenneth for sharing that. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-02-29 Thread Ethan Furman
mmend it if you find that sort of thing interesting. They made a movie from it that was popular but I gather was Hollywood-fluffified as one could expect (I haven't seen it). I'm sure it was fluffified, but it is a good movie. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: convert Dbase (.dbf) files to SQLite databases

2016-03-01 Thread Ethan Furman
ding memo files, conversion from whatever to Unicode if needed, ... Or you can use my dbf module [1] which has been in the wild for several years now and is fairly robust instead of waiting for John's module which has been in the "soon to be released" category for nearly as

Re: convert Dbase (.dbf) files to SQLite databases

2016-03-01 Thread Ethan Furman
Il giorno mercoledì 15 luglio 2009 18:30:29 UTC+2, John Machin ha scritto: Hmm, looks like that email was sent back in 2009. Sorry for the noise. I'm still not able to find a dbf module from John, though. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: convert Dbase (.dbf) files to SQLite databases

2016-03-01 Thread Ethan Furman
On 03/01/2016 06:08 PM, Dennis Lee Bieber wrote: On Tue, 01 Mar 2016 08:49:08 -0800, Ethan Furman declaimed the following: Hmm, looks like that email was sent back in 2009. Sorry for the noise. I'm still not able to find a dbf module from John, though. Is it one of:

Re: Continuing indentation

2016-03-02 Thread Ethan Furman
better way to break lines I'm missing which will make flake8 happy? This is the idiomatic way: if some_condition and \ some_other_condition and \ some_final_condition: play_bingo() No, it isn't. Using '\' for line continuation is strongly dis

Re: Continuing indentation

2016-03-02 Thread Ethan Furman
On 03/02/2016 02:10 PM, Marko Rauhamaa wrote: Ethan Furman : No, it isn't. Using '\' for line continuation is strongly discouraged. Why would you discourage valid syntax? 1) It's ugly 2) Any non-newline whitespace after the '\' and you don't have li

Re: Continuing indentation

2016-03-02 Thread Ethan Furman
ndentation levels for conditions version body to be very helpful. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Continuing indentation

2016-03-02 Thread Ethan Furman
If it's a single-use name I stop remembering after its single use. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Continuing indentation

2016-03-04 Thread Ethan Furman
uch more likely that I'll read the first token of the next line. And, as any pythonista knows: The conditions aren't over until the indentation changes. ;) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Continuing indentation

2016-03-04 Thread Ethan Furman
On 03/04/2016 03:45 PM, Mark Lawrence wrote: > PEP8 is not a standard that must be adhered to under all > cicumstances, it is only a style guide [...] Not only that, it's a style guide for code /in the stdlib/. Make your own style guide for your own projects. ;) -- ~Etha

Re: Continuing indentation

2016-03-04 Thread Ethan Furman
actly one place. > >> You're not the boss of me! > > Nor am I your father. What was that disturbance? The Force whimpering away... -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Continuing indentation

2016-03-04 Thread Ethan Furman
On 03/04/2016 05:17 PM, sohcahto...@gmail.com wrote: I just can't understand why so many people get their panties all up in a bunch over how other people choose to format their code. s/panties/undies/g ;) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Other difference with Perl: Python scripts in a pipe

2016-03-11 Thread Ethan Furman
silence errors? The try/except paradigm is very useful -- it's worth learning. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: sobering observation, python vs. perl

2016-03-18 Thread Ethan Furman
On 03/17/2016 10:35 AM, Charles T. Smith wrote: On Thu, 17 Mar 2016 10:26:12 -0700, Ethan Furman wrote: On 03/17/2016 09:36 AM, Charles T. Smith wrote: Yes, your point was to forgo REs despite that they are useful. I could have thought the search would have been better as: 're

Re: sobering observation, python vs. perl

2016-03-19 Thread Ethan Furman
if re.search('timezone', line): found.append(line) print ''.join(found) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

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