Re: Python 3 isinstance

2009-01-15 Thread Carl Banks
that? Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3 isinstance

2009-01-15 Thread Carl Banks
On Jan 15, 1:08 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: Carl Banks pavlovevide...@gmail.com wrote: I don't see what the big deal is.  Right now isinstance accepts a type or a tuple of types.  The code could be changed to allow a type, or any iterable the returns types (wherein

Re: Does Python really follow its philosophy of Readability counts?

2009-01-14 Thread Carl Banks
On Jan 14, 1:40 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Tue, 13 Jan 2009 20:17:08 -0800, Carl Banks wrote: On Jan 13, 9:50 pm, Carl Banks pavlovevide...@gmail.com wrote: The cultural impact that would have on the community is far worse, IMHO, than any short

Re: Does Python really follow its philosophy of Readability counts?

2009-01-14 Thread Carl Banks
On Jan 14, 2:44 am, Russ P. russ.paie...@gmail.com wrote: On Jan 13, 11:51 pm, Paul Rubin http://phr...@nospam.invalid wrote: Carl Banks pavlovevide...@gmail.com writes: At GE there was no encapsulation in sight on any system I worked on. In fact, our engine simulation was a special

Re: LGPL license for Qt 4.5

2009-01-14 Thread Carl Banks
than GPL software. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3 isinstance

2009-01-14 Thread Carl Banks
to a wishlist request, though. As a workaround, you can just cast the set to a tuple like this: isinstance(x,tuple(s)) Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of Readability counts?

2009-01-13 Thread Carl Banks
in an appropriate decorator, superclass, or whatever. Well, I guess you are the sacrifical lamb so that everyone else can take advantage of the dynamicism. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of Readability counts?

2009-01-13 Thread Carl Banks
On Jan 13, 6:45 pm, Russ P. russ.paie...@gmail.com wrote: On Jan 13, 3:07 pm, Carl Banks pavlovevide...@gmail.com wrote: I've seen no evidence that any Python project is moving even remotely toward data encapsulation.  That would be a drastic change.  Even if it were only a minor change

Re: Does Python really follow its philosophy of Readability counts?

2009-01-13 Thread Carl Banks
On Jan 13, 9:50 pm, Carl Banks pavlovevide...@gmail.com wrote: The cultural impact that would have on the community is far worse, IMHO, than any short-sighted benefits like being able to catch an accidental usage of an internal variable. Trust would be replaced by mistrust, and programming

Re: Does Python really follow its philosophy of Readability counts?

2009-01-13 Thread Carl Banks
system I worked on. In fact, our engine simulation was a special-purpose object-oriented language with--get this--no private variables. Some other systems I worked on didn't even use scoping, let alone encapsulation. Looks like my anecdote cancels out yours! Got any more? Carl Banks -- http

Re: Problem with -3 switch

2009-01-12 Thread Carl Banks
On Jan 12, 12:32 am, John Machin sjmac...@lexicon.net wrote: On Jan 12, 12:23 pm, Carl Banks pavlovevide...@gmail.com wrote: On Jan 9, 6:11 pm, John Machin sjmac...@lexicon.net wrote: On Jan 10, 6:58 am, Carl Banks pavlovevide...@gmail.com wrote: On Jan 9, 12:36 pm, J. Cliff Dyer j

Re: Problem with -3 switch

2009-01-12 Thread Carl Banks
On Jan 12, 5:26 am, John Machin sjmac...@lexicon.net wrote: On Jan 12, 7:29 pm, Carl Banks pavlovevide...@gmail.com wrote: On Jan 12, 12:32 am, John Machin sjmac...@lexicon.net wrote: On Jan 12, 12:23 pm, Carl Banks pavlovevide...@gmail.com wrote: On Jan 9, 6:11 pm, John Machin

Re: Problem with -3 switch

2009-01-12 Thread Carl Banks
at 0x00FD86B0 This is messed him up? If you believe in waiting for bugs to occur and then fixing them, rather than programming to avoid bugs, there is no helping you. P.S. The obvious solution is wrong, although I'm not sure if you were making some kind of ironic point. Carl Banks -- http

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
that the variable isn't in use until it is initialized, and Explicit is better than implicit.) In the end, the answer to you question is simply, Readibilty counts, but other stuff matters too. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
there is something to be said for variables that exist when they are needed and don't when they're not. However, I acknowledge that listing all the variables you intend to use in __init__ is highly comforting, even if it does belie their current uselessness. Carl Banks -- http://mail.python.org/mailman/listinfo

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
On Jan 11, 5:02 pm, Paul Rubin http://phr...@nospam.invalid wrote: Carl Banks pavlovevide...@gmail.com writes: and where it was manipulated for that matter. This criticism is completely unfair.  Instance variables have to be manipulated somewhere, and unless your object is immutable

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
On Jan 11, 5:49 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Jan 11, 2009 at 3:15 PM, Carl Banks pavlovevide...@gmail.com wrote: On Jan 11, 3:31 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Jan 11, 2009 at 1:22 PM, Madhusudan.C.S madhusuda...@gmail.com wrote:    def somemethod

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
On Jan 11, 5:41 pm, Paul Rubin http://phr...@nospam.invalid wrote: Carl Banks pavlovevide...@gmail.com writes: The criticism is very valid.  Some languages do support immutable variables (e.g. final declarations in Java, const in C++, or universal immutability in pure functional

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
On Jan 11, 6:42 pm, Paul Rubin http://phr...@nospam.invalid wrote: Carl Banks pavlovevide...@gmail.com writes: If so, what is it that's so evil about conditionally-existent variables?  (I'll leave the question open-ended this time.) I have found they make the code more confusing and bug

Re: Problem with -3 switch

2009-01-11 Thread Carl Banks
On Jan 9, 6:11 pm, John Machin sjmac...@lexicon.net wrote: On Jan 10, 6:58 am, Carl Banks pavlovevide...@gmail.com wrote: On Jan 9, 12:36 pm, J. Cliff Dyer j...@sdf.lonestar.org wrote: On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote: Aivar Annamaa wrote: As was recently

Re: BadZipfile file is not a zip file

2009-01-09 Thread Carl Banks
module can handle it. It might help you out. http://groups.google.com/group/comp.lang.python/msg/c2008e48368c6543 Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with -3 switch

2009-01-09 Thread Carl Banks
, and really have no shame when it comes to engaging in questionable practices like relying on accidental side effects, rather than taking the time to try to program robustly. I expect people with that style of programming will have many more issues with the transition. Carl Banks -- http

Re: Common path all PyObjects take on destruction?

2009-01-09 Thread Carl Banks
*)(op)) So, if the reference count goes down to zero, Py_DECREF calls _Py_Dealloc to delete the object. _Py_Dealloc is the common point you want. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it ok to type check a boolean argument?

2009-01-08 Thread Carl Banks
it should instead fail loudly. It's always a judgment call how much to screen for bad input, but type errors aren't different from any other error in this regard. Sometimes it's appropriate (note: not, IMHO, in this case), just like it's sometimes appropriate to check for 442. Carl Banks -- http

Re: cPickle vs pickle discrepancy

2009-01-08 Thread Carl Banks
: the PyImport_Import and PyImport_ImportModule functions now default to absolute imports, not relative imports. This will affect C extensions that import other modules. Presumably __import__ also defaults to absolute (since PyImport_Import calls it) so the two modules should both use absolute imports in 2.6. Carl

Re: Making a decorator a staticmethod

2009-01-08 Thread Carl Banks
always be the same object, and that's just a waste. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for tips on how to implement ruby-style Domain Specific Language in Python

2009-01-07 Thread Carl Banks
, and, instead of loading it as a Python file, invokes your DSL parser. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: reflection as in Java: how to create an instance from a classname

2009-01-06 Thread Carl Banks
know what function to call or class to use at compile-time, you can just pass the objects around. No strings required. So what I'm saying is: the Python developers didn't bother to make an high-level, easy-to-use __import__ because there really isn't much demand for it. Carl Banks -- http

Re: pep-8 vs. external interfaces?

2009-01-04 Thread Carl Banks
functions in the same namespace because I am following the example of other language bindings in Perl, Java, Ruby, etc.,, then figure out whether it's important to be consistent with Perl, Java, Ruby, etc., and if so, do whatever they did. If not, see #1. Carl Banks -- http://mail.python.org

Re: Python module import loop issue

2008-12-29 Thread Carl Banks
module in EN - just to make sure that the A1Factory updation code is hit. This looks in-elegent. Not worth it. The straightforward, good-enough way above is good enough. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python module import loop issue

2008-12-29 Thread Carl Banks
Gabriel Genellina wrote: En Mon, 29 Dec 2008 19:47:51 -0200, Carl Banks pavlovevide...@gmail.com escribi�: On Dec 29, 10:51�am, Kottiyath n.kottiy...@gmail.com wrote: Module Factory: A1Factory: {'B1Tag':1.1.B1, 'C1Tag':1.2.C1, 'D1Tag':1.3.D1'} A2Factory: {'B2Tag':2.1.B2, 'C2Tag':2.2.C2

Re: Exec inside a class method to call other class methods?

2008-12-25 Thread Carl Banks
for. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Exec inside a class method to call other class methods?

2008-12-25 Thread Carl Banks
the input. To be honest I am a little concerned over the more-or-less knee-jerk suggestions to refactor this into a highly object-oriented approach. For the task at hand the OP's approach is fine (aside from the use of exec). Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Doing set operation on non-hashable objects

2008-12-24 Thread Carl Banks
in s use Identity(d) in s. And so on. To do it a bit better, you could create an IdentitySet class that subclasses set and wraps the methods so that they automatically apply wrap and unwrap the arguments on their way in and out (I'd bet there's already a cookbook recipe to do that). Carl Banks

Re: Multi-dimension list

2008-12-23 Thread Carl Banks
and slicing, most notably numpy. So, for instance, if you were install numpy, you could get multidimensional arrays and slice 'em up however you'd like: import numpy a = numpy.array([[1,2,3],[4,5,6],[7,8,9]]) print a[1:3,0:2] Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: I always wonder ...

2008-12-22 Thread Carl Banks
credibility, but now there is no doubt that he none at all, so he's not worth replying to, so I don't. I suggest everyone else does likewise and ignores the fool. If you have to followup, at least keep your reply to something short and witty, like, Go away, troll. Carl Banks -- http

Re: python3 urlopen(...).read() returns bytes

2008-12-22 Thread Carl Banks
-encoding is given, for urllib to have an option to automatically decode and return a string instead of bytes. (For all I know, it already can do that.) Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Carl Banks
kinds of new things, a new string formating method would be a minor one. As for everyone else, they'll probably have an easier time of it. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Carl Banks
hacked- up fork of a highly wrought out programming language? Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Carl Banks
no reason they couldn't have added another method for printf-style formating, e.g.: The answer is %s..sprintf(yes) Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: confused about __str__ vs. __repr__

2008-12-18 Thread Carl Banks
function for dicts. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: alt.possessive.its.has.no.apostrophe

2008-12-15 Thread Carl Banks
it, if the rule had been, Use an apostrophe for any word that forms it's possessive by adding an s or z sound, it would have been less inconsistent. Sadly, that's not the rule. English spelling is the Perl of orthography. Carl Banks (...For that matter, if the rule had been, Never augment your

Re: curses and refreshing problem

2008-12-14 Thread Carl Banks
On Dec 14, 5:52 am, Karlo Lozovina _kar...@_mosor.net_ wrote: Carl Banks pavlovevide...@gmail.com wrote innews:69d2698a-6f44-4d85-adc3-1180ab158...@r15g2000prd.googlegroups.com: Unless you are referring to some wget screen mode I don't know about, I suspect wget outputs its progress bar

Re: curses and refreshing problem

2008-12-13 Thread Carl Banks
is sent. Therefore we have to call sys.stdout.flush() to flush the buffer manually. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: internal circular class references

2008-12-11 Thread Carl Banks
return False # note: in Python 3.0 you would want to throw exceptions # for unexpected types Then use ValidDate instead of datetime.date when the date is specified. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: internal circular class references

2008-12-10 Thread Carl Banks
or __new__ or snooping to datetime.date's class dict anything like that. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: internal circular class references

2008-12-10 Thread Carl Banks
the short answer is you can't. The way you have done it is best--its not a hack and is good style. Yes, it's straightforward and readable, a perfectly good workaround for a very minor style issue. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-12-10 Thread Carl Banks
On Dec 10, 12:42 pm, cm_gui [EMAIL PROTECTED] wrote: Python is SLOW.    And I am not comparing it with compiled languages like C. Python is even slower than PHP! cm_gui is TROLL. And I am not compring it with bots like Aaron Castironpi Brody. cm_gui is even troller than Xah Lee! Carl

Re: as keyword woes

2008-12-09 Thread Carl Banks
as an identifier, even when allowed. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: as keyword woes

2008-12-06 Thread Carl Banks
(class_reference) is the only obvious concise answer. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python now coming from Perl

2008-12-06 Thread Carl Banks
these start to be widely available for 3.x, people will sometimes have to make do with the 2.x stuff. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
: bar I had been -0 on this, but now I think I'm -1. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
. $, used as proposed, would be. (Then again, _ is an identifier.) Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
would lose your bet if it were me. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
but I think that's what it ought to be, in general. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
On Dec 6, 4:39 pm, Russ P. [EMAIL PROTECTED] wrote: On Dec 6, 1:21 pm, Carl Banks [EMAIL PROTECTED] wrote: On Dec 6, 9:12 am, Russ P. [EMAIL PROTECTED] wrote: On Dec 6, 1:02 am, Antoine De Groote [EMAIL PROTECTED] wrote: Allowing $ as a substitute for self wouldn't require this new

Re: as keyword woes

2008-12-06 Thread Carl Banks
of the original data. That's exactly what these methods would be doing, changing the type while preserving the semantic value as much as possble, so cast is a perfectly appropriate name for it. (BTW, in C++, even pointer-to-pointer static casts don't always preserve the bits.) Carl Banks -- http

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
On Dec 6, 6:42 pm, Russ P. [EMAIL PROTECTED] wrote: But it's ugly.  No amount of rationalization will make it not ugly. The dollar sign is ugly? I beg to differ. Nope, you're wrong. Carl Banks (See where this is going?) -- http://mail.python.org/mailman/listinfo/python-list

Re: as keyword woes

2008-12-04 Thread Carl Banks
minutes a year to visit Python.org to see what changes are planned for upcoming releases, then feel free to use a language like Java that has the corporate backing to keep bad decisions around for decades. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: as keyword woes

2008-12-04 Thread Carl Banks
of) a history of backward- incompatible changes with every major release. It's not like Python has ignored the users; it's been very careful and considerate when making backwards-incompatible change. This change was planned for eight freaking years. Carl Banks -- http://mail.python.org/mailman

Re: as keyword woes

2008-12-04 Thread Carl Banks
minority, I would guess. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: RELEASED Python 3.0 final

2008-12-03 Thread Carl Banks
On Dec 3, 7:51 pm, Barry Warsaw [EMAIL PROTECTED] wrote: On behalf of the Python development team and the Python community, I am happy to announce the release of Python 3.0 final. Congratulations! This is a great day for the Python community. Carl Banks -- http://mail.python.org/mailman

Re: How can I do this (from Perl) in Python? (closures)

2008-12-03 Thread Carl Banks
] += 1 return start[0] return counter You can access variables from an enclosing scope starting from Python 2.2 (from 2.1 with from __future__ import nested_scopes), but you could not rebind those variables until Python 3.0 came out today. Carl Banks -- http://mail.python.org/mailman

Re: optimization

2008-12-02 Thread Carl Banks
. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: optimization

2008-12-02 Thread Carl Banks
a profiler to get an idea of how much it costs, so you can make an informed decision. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyhon (with wxPython) on Windows' cygwin: can it be done fully ?

2008-11-30 Thread Carl Banks
statement had lots of peculiarities), whereas all function calls follow the same syntax. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused about class relationships

2008-11-29 Thread Carl Banks
newbie. There's a few organizational decisions I'd make differently, but overall it's clean and readable and not too complicated how you did it. At least not what you've showed us. :) Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating classes and objects more than once?

2008-11-28 Thread Carl Banks
with the directory included. If you do use os.chdir(), then early in your script script, add a line such as sys.path[0] = os.getcwd(). Then, no matter where you are, always import the file relative to the starting directory. So always use from test.data import DATA, even after you os.chdir(). Carl Banks

Re: Creating classes and objects more than once?

2008-11-28 Thread Carl Banks
On Nov 28, 3:15 am, Ben Finney [EMAIL PROTECTED] wrote: Carl Banks [EMAIL PROTECTED] writes: I like to think that import abc always does the same thing regardless of any seemingly unrelated state changes of my program, especially since, as the OP pointed out, import is used as a means

Re: Creating classes and objects more than once?

2008-11-28 Thread Carl Banks
On Nov 28, 3:24 am, Viktor Kerkez [EMAIL PROTECTED] wrote: On Nov 28, 9:35 am, Carl Banks [EMAIL PROTECTED] wrote: However, I'm not so sure the effect of os.chdir() on the import path is a good idea. I'm not actually using os.chidir(), I just used it here to create a clearer example

Re: Creating classes and objects more than once?

2008-11-28 Thread Carl Banks
On Nov 28, 2:59 pm, Ben Finney [EMAIL PROTECTED] wrote: Carl Banks [EMAIL PROTECTED] writes: On Nov 28, 3:15 am, Ben Finney [EMAIL PROTECTED] wrote: This is resolved in the Python 2.x series by implementing PEP 328 URL:http://www.python.org/dev/peps/pep-0328/, such that the search

Re: Creating classes and objects more than once?

2008-11-28 Thread Carl Banks
On Nov 28, 11:51 pm, Carl Banks Absolute versus relative imports don't have anything to do with the issue here.  PEP 328 concerns itself with imports relative to the executing module in package space.  It has nothing to do with imports relative to the current directory in filename space. I

Re: False and 0 in the same dictionary

2008-11-05 Thread Carl Banks
: value = self.false_surrogate super(special_dict,self).__getitem__(value) ## etc. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Simplifying anonymous inner classes?

2008-11-01 Thread Carl Banks
Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Ordering python sets

2008-10-27 Thread Carl Banks
= 'binarytree') -1 This doesn't buy you anything over simply implementing different types altogether. a = collections.linkedlist([1,2,3,4,5]) b = collections.btree({'a': 'A'}) In fact, it adds a whole lot of complexity to the built-in types. Carl Banks -- http://mail.python.org/mailman/listinfo/python

Database specialized in storing directed graphs?

2008-10-27 Thread Carl Banks
it. I'm guessing no. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible read()/readline() bug?

2008-10-23 Thread Carl Banks
. :) But please leave seek() out it. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: I want to release the GIL

2008-10-21 Thread Carl Banks
+= 1 c.notify() c.release() The reason threading.Condition is required and not a simple lock is that simply acquiring the lock is not enough; the counter must be in the right state as well. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: I want to release the GIL

2008-10-21 Thread Carl Banks
switch could take place. Obviously the wisdom of what he was doing was suspect, but the OP was right in that a manual GIL release would allow a thread switch and could have helped avoid starvation in that case. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: better scheduler with correct sleep times

2008-10-21 Thread Carl Banks
, so a long time ago) in single-threaded, real-time simulations. Don't know mcuh about the sched module, but time scheduling in general doesn't need multithreading, not one bit. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: I want to release the GIL

2008-10-21 Thread Carl Banks
On Oct 21, 7:49 am, MRAB [EMAIL PROTECTED] wrote: On Oct 21, 10:22 am, Carl Banks [EMAIL PROTECTED] wrote: On Oct 21, 5:09 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 21 Oct 2008 04:58:00 -0200, Piotr Sobolewski   [EMAIL PROTECTED] escribió: But what about my main

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-17 Thread Carl Banks
On Oct 17, 4:25 am, Damien Wyart [EMAIL PROTECTED] wrote: * Carl Banks [EMAIL PROTECTED] in comp.lang.python: The python-mode.el on Subversion (python-mode's Subversion on source forge, not the ancient version of python-mode in the Python repository) has a fix for this issue. It doesn't

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-16 Thread Carl Banks
, not the ancient version of python-mode in the Python repository) has a fix for this issue. It doesn't look like there's any way to browse the subversion any more, though. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-16 Thread Carl Banks
On Oct 16, 12:21 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Carl Banks a écrit : On Oct 14, 1:05 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: - a slightly less but still annoying problem (I wouldn't call it a bug) is the handling of indentation for nested litteral dicts/lists

Re: I built a nice html templater!

2008-10-06 Thread Carl Banks
to search for existing systems, and as an added bonus wouldn't have had to work around all those things that are almost but not quite the way he wanted. Cut him some slack. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: del and sets proposal

2008-10-03 Thread Carl Banks
it can be implemented without introducing inconsistencies. If set behaved that way then del a[1] wouldn't behave like del anymore. Normally, del whatever means that you can no longer use whatever; in this proposal you can. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: del and sets proposal

2008-10-03 Thread Carl Banks
the entry in the object with a value of 1, which IMHO would be perfectly logical for a set (which is why I started this discussion). It's not logical at all. In all current uses of del, the thing that follows del is a valid expression. With sets, that's not the case. Carl Banks -- http

Re: What is not objects in Python?

2008-09-29 Thread Carl Banks
() into a function is just a design decision, that len is a common enough operation that it need elevated status. It's really nothing more. Python wouldn't suffer much regardless if len is a method, a built-in function, or an operator with its own syntax. Carl Banks -- http://mail.python.org/mailman

Re: Borg vs Singleton vs OddClass

2008-09-28 Thread Carl Banks
a metaclass. There are reasons to prefer any of these. I'd recommend the factory function unless you think the users could significantly benefit from type inspection. Just don't do it by rebinding the class name. That's not nice. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: What is not objects in Python?

2008-09-28 Thread Carl Banks
it is, not for whatever computer science buzzword labels it has. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Large Data Sets: Use base variables or classes? And some binding questions

2008-09-26 Thread Carl Banks
object type called namedtuple in the collections module. (Actually it's a type factory that creates a subclass of tuple with attribute names mapped to the indices.) This might be a perfect fit for your needs. You have to upgrade to 2.6, though, which won't be released for a few days. Carl

Re: Large Data Sets: Use base variables or classes? And some binding questions

2008-09-26 Thread Carl Banks
On Sep 26, 7:43 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Fri, 26 Sep 2008 14:54:36 -0700, Carl Banks wrote: However, it seems from the rest of your comments that speed is your main concern.  Last time someone reported __slots__ didn't make a big difference

Re: Large Data Sets: Use base variables or classes? And some binding questions

2008-09-26 Thread Carl Banks
On Sep 26, 8:53 pm, Carl Banks [EMAIL PROTECTED] wrote: It might still end up being slower (creating slot descriptors might take more time for all I know) but it's more than just an effect of less memory. Actually scratch that. Descriptors are only created when the type object is created. I

Re: PEP Proposal

2008-09-25 Thread Carl Banks
changes, using the same ideas as the multimethod implementations, but guaranteeing trial-and-error dispatching. Carl Banks (**) I avoid the term generic function since it constrasts starkly with the use of the word generic in generic programming. -- http://mail.python.org/mailman/listinfo/python

Re: Python style: exceptions vs. sys.exit()

2008-09-24 Thread Carl Banks
, a library should never print error or status messages. Messages should either be sent to the caller somehow, or handled using the logging facility. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: matrix algebra

2008-09-24 Thread Carl Banks
with numpy. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple processes, private working directories

2008-09-24 Thread Carl Banks
but uses processes. I think you can still run it as a third- party module in 2.5. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Why no tailcall-optimization?

2008-09-23 Thread Carl Banks
thing that would benefit only a tiny fraction of users.) Carl Banks (**) Actually the compiler can do some compile-time constant expression folding, but that's about it. Otherwise it's object agnostic. -- http://mail.python.org/mailman/listinfo/python-list

Re: A bit weird dictionary behavior

2008-09-22 Thread Carl Banks
for the truth value of an expression in the first place... Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: report a BUG of package setuptools-0.6c8.

2008-09-20 Thread Carl Banks
should ask on the setuptools mailing list. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

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