Overcharged

2011-06-11 Thread Ethan
I mad a call last night and never even talked to anybody, I knew I was being charged to just look and I'm ok with that amount u was charged. There was another charge though of I think 26 dollers witch I was not told or warned about at all, I need to know who I can call and talk to about this S

Python POS/cash register projects?

2010-01-11 Thread ethan
Anybody have any experience with creating a basic POS register system in Python? Any existing projects out there you are aware of? This would be a GUI app, standalone with some basic export and print functions. I see this as a great opportunity to deepen my Python experience but dont want to rei

Re: Unicode humor

2013-05-10 Thread Ethan Furman
fits inside the first 127 code points!! As a bonus it also takes less brain power^H^H^H^H^H^H^H^H^H space. ;) -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing a blog post on the new Enum.

2013-05-13 Thread Ethan Furman
folks reading your blog would just be downloading, not logging and directly manipulating the repository. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: @staticmethods called more than once

2013-05-21 Thread Ethan Furman
were passed, no implicit first argument. It is basically useless in Python -- you can just use a module function instead of a staticmethod. For there record, staticmethod is useful when you want to make it possible for subclasses to change behavior. -- ~Ethan~ -- http://mail.python.org/m

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-21 Thread Ethan Furman
ferently, or not at all, on other systems this is the wrong way to fix it. Where did you learn Python from? “Python Worst Practice for Dummies”? Chris Warrick, Was that necessary? Useful? Helpful in any way? If you can't be civil, keep your posts to yourself. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Myth Busters: % "this old style of formatting will eventually be removed from the language"

2013-05-21 Thread Ethan Furman
g away any time soon. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-identifiers in dictionary keys for **expression syntax

2013-05-23 Thread Ethan Furman
nc(foo bar baz = 3)`, it still worked when going through a dict. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Short-circuit Logic

2013-05-30 Thread Ethan Furman
zeros (maybe it should have been two), then silently skipping the loop is the "far, far worse" scenario. With the infinite loop you at least know something went wrong, and you know it pretty darn quick (since you are testing, right? ;). -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Short-circuit Logic

2013-05-30 Thread Ethan Furman
On 05/30/2013 08:56 AM, Chris Angelico wrote: On Fri, May 31, 2013 at 1:02 AM, Ethan Furman wrote: On 05/30/2013 05:58 AM, Chris Angelico wrote: If you iterate from 1000 to 173, you get nowhere. This is the expected behaviour; this is what a C-style for loop would be written as, it's

Re: Re-using copyrighted code

2013-06-10 Thread Ethan Furman
link! -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: My son wants me to teach him Python

2013-06-12 Thread Ethan Furman
While I agree with Chris that 3.x is best, there is a free class from Udacity that is actually pretty good, even if it does target Python2 (.7 I believe). https://www.udacity.com/course/cs101 -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: "Don't rebind built-in names*" - it confuses readers

2013-06-12 Thread Ethan Furman
[int(i) for i in ["1","2","3"]] TypeError: str is not callable Now how are you going to get the original int type back? --> del int Mark Janssen*, you would increase your credibility if you actually *learned* Python. -- ~Ethan~ *full name used to disting

Re: My son wants me to teach him Python

2013-06-12 Thread Ethan Furman
Python Making Games with Python & Pygame Both are for Python 3.x. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: My son wants me to teach him Python

2013-06-13 Thread Ethan Furman
On 06/13/2013 06:23 PM, Steven D'Aprano wrote: I consider IDEs to be an attractive nuisance. It's like learning to be a chef by putting food in a microwave and pushing the pre-set buttons. +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the semantics meaning of 'object'?

2013-06-26 Thread Ethan Furman
some other method that doesn't exist on object, then this technique is necessary to prevent the topmost class from trying to call that method on object and erroring out. But in that case the Blocker wouldn't call super since it is acting as the base class. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the semantics meaning of 'object'?

2013-06-26 Thread Ethan Furman
t's too late to change the name now, but pretending there is no good and valid reason for confusion doesn't help. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the semantics meaning of 'object'?

2013-06-26 Thread Ethan Furman
On 06/26/2013 04:54 PM, Steven D'Aprano wrote: On Wed, 26 Jun 2013 13:14:44 -0700, Ethan Furman wrote: On 06/23/2013 11:50 AM, Steven D'Aprano wrote: What else would you call a function that does lookups on the current object's superclasses? Well, I would call it super

Re: Why is the argparse module so inflexible?

2013-06-27 Thread Ethan Furman
hat its current sys.exit behavior become default but optional in 3.4+. There might even be an issue already if one searched. If the OP is writing an interactive shell, shouldn't `cmd` be used instead of `argparse`? argparse is, after all, intended for argument parsing of command line scripts,

Re: Problems with subclassing enum34

2013-06-28 Thread Ethan Furman
before, IntEnum should work. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with subclassing enum34

2013-06-28 Thread Ethan Furman
: Traceback (most recent call last): File "ct.py", line 7, in class MyEnum(ctypes.c_int, Enum): File "/home/ethan/source/enum/enum/py2_enum.py", line 149, in __new__ enum_class = super(EnumMeta, metacls).__new__(metacls, cls, bases, classdict) Type

Re: Why is the argparse module so inflexible?

2013-06-28 Thread Ethan Furman
to make command-line scripts easier and friendlier should quit with a traceback? Really? -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is the argparse module so inflexible?

2013-06-29 Thread Ethan Furman
On 06/28/2013 10:28 PM, Steven D'Aprano wrote: I'm willing to concede that, just maybe, something like argparse could default to "catch exceptions and exit" ON rather than OFF. On this we can agree. :) -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Default scope of variables

2013-07-07 Thread Ethan Furman
uot;blah") with tran2.subtransaction() as tran3: tran3.query("blah") # roll this subtransaction back tran2.query("blah") tran2.commit() tran1.query("blah") tran1.commit() -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Default scope of variables

2013-07-07 Thread Ethan Furman
quot;blah") with tran.subtransaction(): tran.query("blah") # roll this subtransaction back tran.query("blah") tran.commit() tran.query("blah") tran.commit() This would definitely make more sense in a loop. ;) -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: A small question about PEP 8

2013-07-08 Thread Ethan Furman
""" a_wonderful_set_of_things = { ..., not_missing_an_end_brace} """ You can also (be a fool and) put it at the same *indentation*: """ a_wonderful_set_of_things = { ..., not_missing_an_end_brace } """ Not only a fool but a crazy fool! That next-to-last line should have a comma! -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Default scope of variables

2013-07-09 Thread Ethan Furman
ing: self.transaction_active =', self.transaction_active return self with Tester() as conn: print 'in first with block' print '-' * 50 with Tester().updating() as conn: print 'in second with block' with it's

Re: Help with 'self' and 'set_usage'

2013-07-09 Thread Ethan Furman
hobby = "fishing"?? Yup, you sure can. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Default scope of variables

2013-07-09 Thread Ethan Furman
On 07/09/2013 09:44 AM, Ian Kelly wrote: On Tue, Jul 9, 2013 at 10:07 AM, Ethan Furman wrote: You could also do it like this: def updating(self): self.transaction_active = True return self Yes, that would be simpler. I was all set to point out why this doesn't

Re: Default scope of variables

2013-07-09 Thread Ethan Furman
On 07/09/2013 11:41 AM, Ian Kelly wrote: On Tue, Jul 9, 2013 at 11:23 AM, Ethan Furman wrote: On 07/09/2013 09:44 AM, Ian Kelly wrote: On Tue, Jul 9, 2013 at 10:07 AM, Ethan Furman wrote: You could also do it like this: def updating(self): self.transaction_active = True

Re: Recursive class | can you modify self directly?

2013-07-09 Thread Ethan Furman
Expr(self, choice('+-*/'), choice('12345')) `self` is just a name. In `expand()` you are rebinding the name `self` away from the object and to a new Expr instance. If you want to change `self` the original object you have to do something like: def expand(self):

Re: Default scope of variables

2013-07-10 Thread Ethan Furman
On 07/09/2013 10:54 PM, Frank Millman wrote: "Ian Kelly" wrote in message news:calwzidnf3obe0enf3xthlj5a40k8hxvthveipecq8+34zxy...@mail.gmail.com... On Tue, Jul 9, 2013 at 10:07 AM, Ethan Furman wrote: You could also do it like this: def upd

Re: Stack Overflow moderator “animuson”

2013-07-10 Thread Ethan Furman
like this but do you realise that this is exactly what you're arguing for when saying that sum() shouldn't use "+="? my_obj = SomeKoolClass() my_obj.modify_in_some_kool_way() new_result = sum([SKC1, SKC2, SKC3], my_obj) Guess what? You've just changed my_obj. -- ~Ethan~ -- h

Python 3: dict & dict.keys()

2013-07-23 Thread Ethan Furman
I understand that the appropriate incantation in Python 3 is: --> for k in list(d) ...... or --> dk = list(d) --> dk.remove(2) which also has the added benefit of working the same way in Python 2. So, my question boils down to: in Python 3 how is dict.keys() different from dict? What are the use cases? -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3: dict & dict.keys()

2013-07-24 Thread Ethan Furman
On 07/24/2013 05:51 AM, Oscar Benjamin wrote: On Jul 24, 2013 7:25 AM, "Peter Otten" <__pete...@web.de <mailto:pete...@web.de>> wrote: Ethan Furman wrote: > So, my question boils down to: in Python 3 how is dict.keys() different > from dict? What are the use ca

Re: Python 3: dict & dict.keys()

2013-07-24 Thread Ethan Furman
On 07/24/2013 10:23 AM, Stefan Behnel wrote: Peter Otten, 24.07.2013 08:23: Ethan Furman wrote: So, my question boils down to: in Python 3 how is dict.keys() different from dict? What are the use cases? To me it looks like views are a solution waiting for a problem. They reduce the API

Re: Python 3: dict & dict.keys()

2013-07-24 Thread Ethan Furman
h better and much more cleanly than the old copy-to-list way. Thank you. :) -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3: dict & dict.keys()

2013-07-24 Thread Ethan Furman
> dv = d.viewkeys() --> list(dv) [1, 2, 3] --> list(dv) [1, 2, 3] And views are not sets -- they just support a couple set-like operations. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3: dict & dict.keys()

2013-07-24 Thread Ethan Furman
On 07/23/2013 07:11 PM, Steven D'Aprano wrote: On Tue, 23 Jul 2013 18:16:08 -0700, Ethan Furman wrote: So now, in Python 3, .keys(), .values(), even .items() all return these 'view' thingies. And everything I thought I knew about when to use one or the other went out the windo

Re: Python 3: dict & dict.keys()

2013-07-25 Thread Ethan Furman
On 07/24/2013 11:01 PM, alex23 wrote: On 25/07/2013 4:31 AM, Ethan Furman wrote: 2) Hopefully learn something about when a view is useful. I haven't seeen this mentioned - forgive me if it's a repeat - but views are constant references to whichever set they represent. Python

Re: Python 3: dict & dict.keys()

2013-07-25 Thread Ethan Furman
On 07/24/2013 10:48 PM, Steven D'Aprano wrote: On Wed, 24 Jul 2013 08:57:11 -0700, Ethan Furman wrote: My point is that in 2.x .keys() did something different from the dict, while in 3.x it appears to me that they are the same. Then you aren't looking very closely. Actually, I a

Re: Python 3: dict & dict.keys()

2013-07-25 Thread Ethan Furman
concrete lists: they show the /current/ state, and so are always up-do-date. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: [Savoynet] G&S Opera Co: Pirates of Penzance

2013-07-28 Thread Ethan Furman
On 07/28/2013 10:57 AM, Chris Angelico wrote: . . . Okay, how did you get confused that this was a Python List question? ;) -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

MyOpenID.com no longer supported

2013-07-29 Thread Ethan Furman
login method you should add another that doesn't depend on MyOpenID. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: MyOpenID.com no longer supported

2013-07-29 Thread Ethan Furman
On 07/29/2013 02:11 AM, Antoine Pitrou wrote: Le Mon, 29 Jul 2013 00:55:53 -0700, Ethan Furman a écrit : Excerpt from http://meta.stackoverflow.com/q/190442/176681: Janrain no longer actively supports MyOpenID, and announced on Twitter that their users should proceed with caution. This

Re: Bitwise Operations

2013-07-29 Thread Ethan Furman
t; only gives errors. x = (int('101', 2) & int('010', 2)) Notice the quotes. In the future you'll better answers quicker if you tell us what you did (such as your example above) as well as the errors. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: OrderedEnum examples

2013-07-30 Thread Ethan Furman
has the __ordered__ attribute removed (presumably because, in contrast to Python 2.x, Python 3 will respect the order of attribute definition). Correct. In 3.4 __ordered__ never came into being as it was not necessary. I added that purely so that 2.x could be ordered if desired. -- ~

Re: OrderedEnum examples

2013-07-30 Thread Ethan Furman
On 07/30/2013 11:38 AM, Ethan Furman wrote: Thanks for catching that, I'll get it fixed asap. Latest code is on PyPI. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: OrderedEnum examples

2013-07-30 Thread Ethan Furman
to be `_value_`, but in the other methods `.value` works fine. Updated the 3.4 example with `.value`. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: exception problem

2012-06-28 Thread Ethan Furman
you, along with the full trace-back, giving you most if not all the information you needed to track down the bug. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: I can't send images to this mail-list

2012-06-29 Thread Ethan Furman
Ben Finney wrote: Chris Angelico writes: 梦幻草 wrote: why can't I send images to python-list@python.org?? >> It's a text-only list. I'll take this opportunity to give heartfelt thanks to the administrators for that policy; please keep this a text-only forum. +1000 -- http://mail.python

Re: Question about weakref

2012-07-06 Thread Ethan Furman
Ian Kelly wrote: def del_b(self, b): for i, x in enumerate(self.array): if b is x: del self.array[i] break Nice work, Ian. -- http://mail.python.org/mailman/listinfo/python-list

API design question for dbf.py

2012-07-06 Thread Ethan Furman
ecord? ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: API design question for dbf.py

2012-07-06 Thread Ethan Furman
MRAB wrote: On 06/07/2012 22:34, Ethan Furman wrote: I'm looking for some free advice. ;) My dbf module has three basic containers, all of which support list-like access: Table, List, and Index, each of which is filled with _DbfRecords. The fun part is that a _DbfRecord can compare

Re: API design question for dbf.py

2012-07-06 Thread Ethan Furman
Devin Jeanpierre wrote: On Fri, Jul 6, 2012 at 6:46 PM, Ethan Furman wrote: It's checking for equality, not identity. >>> x = float('nan') >>> x in [x] True It's checking for equality OR identity. Good point. In my case, checking for equality w

Re: Python Interview Questions

2012-07-10 Thread Ethan Furman
.6 (or at least the end of the 2.x cycle) I would be suspicious that they actually had the experience they claimed. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Interview Questions

2012-07-10 Thread Ethan Furman
a few years ago where the prospective employer wanted three plus years experience in some language, and that language had only been created a year and a half before. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python professional certification

2012-07-13 Thread Ethan Furman
ion class offered in conjunction with the Illinois Institute of Technology (or something like that) which was created by Steve Holden, and taught by him and a couple others. It's a great course of four classes. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Ethan Furman
ve a conflict between treating time values as time values ("midnight is nothing special") and as numbers ("midnight == 0 which is falsey"). --> import datetime --> mn = datetime.time(0) --> mn datetime.time(0, 0) --> mn == 0 False Apparently, midnight does

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Ethan Furman
re what Steven was trying to say there, but for me: jar with no jellybeans == 0 no jar == None ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit conversion to boolean in if and while statements

2012-07-17 Thread Ethan Furman
ned quacks like nothing, doesn't it? It's about /representing/ something vs. nothing. An undefined name isn't representing anything (except a bug, of course ;). ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Encapsulation, inheritance and polymorphism

2012-07-17 Thread Ethan Furman
to one declared type, where the type declaration mechanisms are usually quite limited. >>> def max(a, b): if a <= b: return a return b Surely you meant 'if a >= b: . . .' No worries, I'm sure your unittests would have caught it. ;) ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Encapsulation, inheritance and polymorphism

2012-07-17 Thread Ethan Furman
Mark Lawrence wrote: On 17/07/2012 18:29, Ethan Furman wrote: Terry Reedy wrote: On 7/17/2012 10:23 AM, Lipska the Kat wrote: Well 'type-bondage' is a strange way of thinking about compile time type checking and making code easier to read (and therefor debug 'type-

Foxpro goto command and deleted records

2012-07-17 Thread Ethan Furman
eleted record 3) go to the seventh undeleted record (possibly the least practical) 4) raise an exception Any opinions? ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Foxpro goto command and deleted records

2012-07-17 Thread Ethan Furman
Ian Kelly wrote: On Tue, Jul 17, 2012 at 4:57 PM, Ethan Furman wrote: In Foxpro if you do a GOTO 7 with deleted off and record 7 is deleted, the record pointer doesn't move (at least in version 6). I don't like that. I see four other options: 0) don't move the poin

Re: Foxpro goto command and deleted records

2012-07-17 Thread Ethan Furman
MRAB wrote: On 17/07/2012 23:57, Ethan Furman wrote: In Foxpro if you do a GOTO 7 with deleted off and record 7 is deleted, the record pointer doesn't move (at least in version 6). I don't like that. I see four other options: 0) don't move the pointer (listed for complet

Re: Foxpro goto command and deleted records

2012-07-17 Thread Ethan Furman
MRAB wrote: On 18/07/2012 03:19, Ethan Furman wrote: MRAB wrote: On 17/07/2012 23:57, Ethan Furman wrote: In Foxpro if you do a GOTO 7 with deleted off and record 7 is deleted, the record pointer doesn't move (at least in version 6). I don't like that. I see four other options:

Re: Encapsulation, inheritance and polymorphism

2012-07-18 Thread Ethan Furman
nctions exist -- kinda ;) Even functions live in some namespace: len() lives in __builtin__, any top level function lives in its module, etc. Oh, and namespaces are objects. It seems to me that Python is more about providing tools, and then staying out of your way. That works for me. Maybe

Re: Foxpro goto command and deleted records

2012-07-18 Thread Ethan Furman
Ed Leafe wrote: On Jul 17, 2012, at 5:57 PM, Ethan Furman wrote: In Foxpro if you do a GOTO 7 with deleted off and record 7 is deleted, the record pointer doesn't move (at least in version 6). I don't like that. I see four other options: 0) don't move the pointer (listed f

ANN: dbf.py 0.94

2012-07-20 Thread Ethan Furman
Getting closer to a stable release. Latest version has a simpler, cleaner API, and works on PyPy (and hopefully the other implementations as well ;), as well as CPython. Get your copy at http://python.org/pypi/dbf. Bug reports, comments, and kudos welcome! ;) ~Ethan~ -- http

Re: ANN: dbf.py 0.94

2012-07-20 Thread Ethan Furman
Steven D'Aprano wrote: On Fri, 20 Jul 2012 16:59:21 -0700, Ethan Furman wrote: Getting closer to a stable release. Excellent! That's fantastic news! I've been waiting for a stable release of dbf for months! I just have one question. What is dbf? :) dbf (also known as pyt

Re: ANN: dbf.py 0.94

2012-07-21 Thread Ethan Furman
nightmare; My support is pretty good. :) 3) that he just doesn't give a monkey's toss for anyone else's time See point one. or all three. Ethan is a good, helpful member of this community, and so I'm pretty sure that neither 2) nor 3) are true, but others may get the

Re: ANN: dbf.py 0.94

2012-07-21 Thread Ethan Furman
h PyPy 1.8. (Tested) Should work with the others. (Not tested) ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: dbf.py 0.94

2012-07-21 Thread Ethan Furman
Chris Angelico wrote: On Sat, Jul 21, 2012 at 6:02 PM, Ethan Furman wrote: Works with CPython 2.4 - 2.7. (Tested) Have you considered supporting 3.2/3.3 at all? It's often not difficult to make your code compatible with both. Or is there some dependency that is locked to 2.X? I'

Re: ANN: dbf.py 0.94

2012-07-21 Thread Ethan Furman
S : bareable is spelt bearable. I wondered about that. :/ ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: dbf.py 0.94

2012-07-23 Thread Ethan Furman
Ethan Furman wrote: Alex Strickland wrote: "Not supported: index files": I have been using http://sourceforge.net/projects/harbour-project/ for years where a guy called Przemyslaw Czerpak has written an absolutely bullet proof implementation of NTX and CDX for DBF. Maybe it will

Re: ANN: dbf.py 0.94

2012-07-23 Thread Ethan Furman
Chris Angelico wrote: On Sun, Jul 22, 2012 at 4:15 AM, Ethan Furman wrote: I'll support 3.3+, but not with the same code base: I want to use all the cool features that 3.3 has! :) The trouble with double-codebasing is that you have double maintenance. But sure. So long as your time

Re: Gender, Representativeness and Reputation in StackOverflow

2012-07-23 Thread Ethan Furman
some valuable time. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: the meaning of rユ.......ï¾

2012-07-24 Thread Ethan Furman
American invention, so no claiming it as an Australian thing. We just need to get a few more people here to start observing it; that's all. I'm in! At least for next year. Assuming I remember... ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: from future import pass_function

2012-07-25 Thread Ethan Furman
: do_something() except: pass() Do you have a use case where `pass()` works but `pass` doesn't? ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: from future import pass_function

2012-07-25 Thread Ethan Furman
thing to do. What code does `pass` run? When do we pass parameters to `pass`? When do we need to override `pass`? Answers: None. Never. Still waiting for a reply from the OP for a use case. How does that quote go? "A foolish consistency is the hobgoblin of little minds"? Thi

ANN: dbf.py 0.94.003

2012-07-26 Thread Ethan Furman
A few more bug fixes, and I actually included the documentation this time. :) It can be found at http://python.org/pypi/dbf, and has been tested on CPythons 2.4 - 2.7, and PyPy 1.8. dbf v0.94.003 = dbf (also known as python dbase) is a module for reading/writing dBase III, FP,

Re: dict: keys() and values() order guaranteed to be same?

2012-07-26 Thread Ethan Furman
that .keys(), .values(), etc., will maintain order unless the dict is modified in between calls. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: dict: keys() and values() order guaranteed to be same?

2012-07-26 Thread Ethan Furman
nless you modify the dict while iterating). or modify the dict between iterations. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: from future import pass_function

2012-07-26 Thread Ethan Furman
John Ladasky wrote: On Wednesday, July 25, 2012 9:32:33 PM UTC-7, Ethan Furman wrote: What code does `pass` run? When do we pass parameters to `pass`? When do we need to override `pass`? Answers: None. Never. Still waiting for a reply from the OP for a use case. When I brought up

Re: from future import pass_function

2012-07-26 Thread Ethan Furman
ary, but I wouldn't call it `_pass`. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: dbf.py 0.94.003

2012-07-27 Thread Ethan Furman
Simon Cropper wrote: On 27/07/12 05:31, Ethan Furman wrote: A few more bug fixes, and I actually included the documentation this time. :) It can be found at http://python.org/pypi/dbf, and has been tested on CPythons 2.4 - 2.7, and PyPy 1.8. [snip] Ethan, That's great. Can you comme

Re: [ANN] pyknon: Simple Python library to generate music in a hacker friendly way.

2012-07-30 Thread Ethan Furman
fficult to read. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] pyknon: Simple Python library to generate music in a hacker friendly way.

2012-07-30 Thread Ethan Furman
Pedro Kroger wrote: On Jul 30, 2012, at 3:33 PM, Ethan Furman <mailto:et...@stoneleaf.us>> wrote: Pedro Kroger wrote: Pyknon is a simple music library for Python hackers. Sounds cool. How is 'Pyknon' pronounced? I pronounce it similarly as google translate do

Re: NameError vs AttributeError

2012-08-01 Thread Ethan Furman
Terry Reedy wrote: On 7/31/2012 4:49 PM, Chris Kaynor wrote: On Tue, Jul 31, 2012 at 1:21 PM, Terry Reedy wrote: Another example: KeyError and IndexError are both subscript errors, but there is no SubscriptError superclass, even though both work thru the same mechanism -- __getitem__. The reas

dbf.py API question

2012-08-02 Thread Ethan Furman
pe of situation with indices, but now I'm wondering if the :name: method is not pythonic and I should use a flag (in_memory=True) when memory storage instead of disk storage is desired. Thoughts? ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: dbf.py API question

2012-08-03 Thread Ethan Furman
Peter Otten wrote: Ethan Furman wrote: SQLite has a neat feature where if you give it a the file-name of ':memory:' the resulting table is in memory and not on disk. I thought it was a cool feature, but expanded it slightly: any name surrounded by colons results in an in-memory t

Re: ANN: dbf.py 0.94

2012-08-03 Thread Ethan Furman
Mark Lawrence wrote: On 21/07/2012 00:59, Ethan Furman wrote: Getting closer to a stable release. Latest version has a simpler, cleaner API, and works on PyPy (and hopefully the other implementations as well ;), as well as CPython. Get your copy at http://python.org/pypi/dbf. Bug reports

Re: Calling Values

2012-08-03 Thread Ethan Furman
e is:",num3 print "New Number Two is:",num4 This works. No, it doesn't. If it does work for you then you have code you aren't showing us. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: dbf.py API question

2012-08-05 Thread Ethan Furman
Ole Martin Bjørndalen wrote: On Thu, Aug 2, 2012 at 5:55 PM, Ethan Furman wrote: SQLite has a neat feature where if you give it a the file-name of ':memory:' the resulting table is in memory and not on disk. I thought it was a cool feature, but expanded it slightly: any name sur

Re: On-topic: alternate Python implementations

2012-08-05 Thread Ethan Furman
Mark Lawrence wrote: With arrogance like that German by any chance? Comments like that are not appropriate on this list. Please don't make them. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: dbf.py API question

2012-08-06 Thread Ethan Furman
[redirecting back to list] Ole Martin Bjørndalen wrote: On Sun, Aug 5, 2012 at 4:09 PM, Ethan Furman wrote: Ole Martin Bjørndalen wrote: You can do this by implementing either __getitem__ or __iter__, unless the streaming flag would also make your table not in memory. Cool! Wow! I realize

Re: Intermediate Python user needed help

2012-08-06 Thread Ethan Furman
ese are not the errors an intermediate user would make, nor the questions an intermediate user would ask. These are the errors that somebody who doesn't know Python would make. Please do not misrepresent yourself. ~Ethan~ P.S. The scale I am accustomed to is Novice -> Intermediate

Re: looking for a neat solution to a nested loop problem

2012-08-06 Thread Ethan Furman
- is there a neat python-like way to this? I realize I can do things like use a variable for k in range(1): and then derive values for i and j from k, but I'm wondering if there's something less clunky. for i in range(N, N+100): for j in range(M, M+100): do_something

Re: dbf.py API question

2012-08-08 Thread Ethan Furman
Ed Leafe wrote: When converting from paradigms in other languages, I've often been tempted to follow the accepted pattern for that language, and I've almost always regretted it. +1 When in doubt, make it as Pythonic as possible. +1 QOTW ~Ethan~ -- http://mail.

  1   2   3   4   5   6   7   8   9   10   >