Re: [Python-Dev] Community buildbots

2006-07-13 Thread Greg Ewing
ly not something that should be a program-wide setting. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] Problem with super() usage

2006-07-16 Thread Greg Ewing
not be at the end of the mro with respect to a particular method? The only thing I can think of is to write all my super()-using methods defensively like this: def m(self): ... s = super(C, self) if hasattr(s, 'm'):

Re: [Python-Dev] Problem with super() usage

2006-07-18 Thread Greg Ewing
Guido van Rossum wrote: > In the world where cooperative multiple inheritance > originated (C++), this would be a static error. I wasn't aware that C++ had anything resembling super(). Is it a recent addition to the language? -- Greg ___

Re: [Python-Dev] logging module broken because of locale

2006-07-18 Thread Greg Ewing
jects not to have upper() and lower() methods at all in Py3k. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Strategy for converting the decimal module to C

2006-07-19 Thread Greg Ewing
ode in to avoid them or even using a different algorithm. But couldn't you just put in an interrupt handler that counts the interrupts, for the purpose of measurement? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mai

Re: [Python-Dev] Strategy for converting the decimal module to C

2006-07-20 Thread Greg Ewing
articular piece of code generates. Surely that's deterministic, and isn't affected by any of that stuff? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.

Re: [Python-Dev] new security doc using object-capabilities

2006-07-22 Thread Greg Ewing
re is no way such > changes would go into mainstream CPython. How much code is actually out there that uses __subclasses__? It seems like a fairly esoteric corner of the language to me. In any case, I think this approach should certainly be tried, and if it works out, considere

Re: [Python-Dev] Python 2.4, VS 2005 & Profile Guided Optmization

2006-07-23 Thread Greg Ewing
d idea to rely on Microsoft turning a blind eye to that. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] new security doc using object-capabilities

2006-07-24 Thread Greg Ewing
o different objects in the first place. It sounds to me like Zope is using the approach it's using because it's having to work with Python as it currently is, not because its approach is the best one. -- Greg ___ Python-Dev mailing list Py

Re: [Python-Dev] Strategy for converting the decimal module to C

2006-07-24 Thread Greg Ewing
e were talking about floating point exceptions. Unless your TLB miss handler uses floating point arithmethic, there's no way it can get interrupted by one. (And if it does use floating point arithmetic in a way that can cause an exception, you'd better write it to d

Re: [Python-Dev] new security doc using object-capabilities

2006-07-25 Thread Greg Ewing
fine-grained enough to begin with. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Strategy for converting the decimal module to C

2006-07-26 Thread Greg Ewing
that mess with unrelated critical data structures. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Internal namespace proposal

2006-07-27 Thread Greg Ewing
t__ on an existing object; only to have __init__ > implicitly called when a new object is constructed. What about calling an inherited __init__ method? Your proposed rule would seem to disallow BaseClass.__init__(self, ...) -- Greg ___

Re: [Python-Dev] Internal namespace proposal

2006-07-27 Thread Greg Ewing
ubclassed. Which means we're back to the situation of having to prevent access to class objects. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman

[Python-Dev] httplib and bad response chunking

2006-07-28 Thread Greg Ward
(Fixing the inadvertent ValueError is trivial, so I'm concentrating on getting the tests right first.) Oh yeah, my patch is relative to the 2.4 branch. Greg -- Greg Ward <[EMAIL PROTECTED]> http://www.gerg.ca/ I don't

Re: [Python-Dev] Bad interaction of __index__ and sequence repeat

2006-07-28 Thread Greg Ewing
; result to fit in a Py_ssize_t. Why is it defined to do this instead of raising OverflowError? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/option

Re: [Python-Dev] Bad interaction of __index__ and sequence repeat

2006-07-28 Thread Greg Ewing
r range exception that *should* be produced by the code using the index, and would be if it got the equivalent index value as an int or long directly. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] Bad interaction of __index__ and sequence repeat

2006-07-28 Thread Greg Ewing
Guido van Rossum wrote: > In my recollection I tried to avoid this exact behavior. I wanted > __index__() to just return the unclipped int or long value, but have a > C API that clipped it for use in slice operations. So is there still a chance to fix it?

[Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)

2006-07-28 Thread Greg Ewing
which rounds and converts to an int in one go? Whenever I use round(), I almost always want the result as an int, and making me do it in two steps seems unnecessarily bothersome. Since automatic float->int coercion is being increasingly disallowed, use cases for this are becoming more and m

Re: [Python-Dev] httplib and bad response chunking

2006-07-31 Thread Greg Ward
portably, though. Well, I'll see if I can whip up a Unix-y solution and see if anyone knows how to make it portable. Greg -- Greg Ward <[EMAIL PROTECTED]> http://www.gerg.ca/ Be careful: sometimes, you're only standing on the shoulders of idiots

Re: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)

2006-07-31 Thread Greg Ewing
ill do with negative numbers. It's not even immediately obvious that it's doing round-to-nearest-integer unless you're familiar with the idiom. A single well-named function would be much more explicit. -- Greg ___ Python-Dev mailing list Py

Re: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)

2006-08-01 Thread Greg Ewing
the argument. No, round() wouldn't have that option at all. If you wanted it, you would use fround() instead, which would have the option and return a float always. This would be a Py3k thing, obviously. If done before then, the new function would have to be gi

Re: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)

2006-08-01 Thread Greg Ewing
give a different result than you would want. > Hmm, looks like a YAGNI to me, In all my programming so far I've found numerous uses for round-to-int, and exactly zero uses for round-binary-float-to-decimal- places. So from my point of view, the YAGNI applies to the *current

Re: [Python-Dev] Rounding float to int directly ...

2006-08-02 Thread Greg Ewing
to *have* both. What's the feeling about this? If, e.g. int() were changed in Py3k to round instead of truncate, would it cause anyone substantial pain? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/pyt

Re: [Python-Dev] Rounding float to int directly ...

2006-08-02 Thread Greg Ewing
Michael Chermside wrote: > (Why you would WANT > more than around 53 bits of precision is a different question, but > Decimal handles it.) You can't have travelled far beyond Alpha Centauri recently. The major interstellar banking corporations need *quite* a lot of bits for dealing with the econom

Re: [Python-Dev] Rounding float to int directly ...

2006-08-02 Thread Greg Ewing
r something else. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)

2006-08-02 Thread Greg Ewing
an integer instead of > a float would buy you. It saves you a function call in the vast majority of cases, where an int is what you ultimately want. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)

2006-08-02 Thread Greg Ewing
t. Sure you can define your own function to do this. But that's still a considerable burden when you add up the effort over all the programs that use int(round()). -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mai

Re: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)

2006-08-03 Thread Greg Ewing
h use for it personally. I'm also *not* advocating changing the existing behaviour of round() or int(). That was just tentative speculation. All I'm asking for is another function that does round-to-int directly. I wouldn't have thought that was such a controversial idea, g

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-03 Thread Greg Ewing
M.-A. Lemburg wrote: > Perhaps we ought to add an exception to the dict lookup mechanism > and continue to silence UnicodeErrors ?! Seems to be that comparison of unicode and non-unicode strings for equality shouldn't raise exceptions in the first plac

Re: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)

2006-08-04 Thread Greg Ewing
James Y Knight wrote: > And it does in C because C doesn't have arbitrary size integers, so if > round returned integers, round(1e+308) couldn't work. Also, in C you can use the result directly in an int context without complaint. In Python these days, that is usually disa

Re: [Python-Dev] unicode hell/mixing str and unicode as dictionary keys

2006-08-04 Thread Greg Ewing
disputing that an exception should be raised if the string *must* be interpretable as characters in order to continue. But that's not true here if you allow for the interpretation that they're simply objects of different (duck) type and therefore unequal. -- Greg _

Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str and unicode asdictionarykeys

2006-08-08 Thread Greg Ewing
ypes may or may not indicate a bug in the code as well, but we don't seem to worry that it doesn't raise an exception. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: h

Re: [Python-Dev] openSSL and windows binaries - license

2006-08-08 Thread Greg Ewing
nt, and distributing a binary doesn't violate the patent, then what *would* constitute a violation of a software patent? Writing new code using the algorithm? Compiling something which uses it? -- Greg ___ Python-Dev mailing list Python-Dev@python

Re: [Python-Dev] openSSL and windows binaries - license

2006-08-09 Thread Greg Ewing
Martin v. Löwis wrote: > In the context of an encryption algorithm, the right to > use would be the most prominent one; you wouldn't be > allowed to use the algorithm unless you have a patent > license. But what does "use" *mean* in relatio

Re: [Python-Dev] openSSL and windows binaries - license

2006-08-10 Thread Greg Ewing
n with open source software. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] Is module clearing still necessary? [Re: Is this a bug?]

2006-08-10 Thread Greg Ewing
't remember there being much discussion about it. Has anyone had any thoughts on that? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/py

Re: [Python-Dev] SyntaxError: can't assign to function call

2006-08-10 Thread Greg Ewing
e done. Can you show a realistic use case for this, that demonstrates a clear advantage to having new syntax? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

[Python-Dev] Split augmented assignment into two operator sets? [Re: SyntaxError: can't assign to function call]

2006-08-10 Thread Greg Ewing
n arrays concisely. The +: family would fill this need. PPS: Yes, I know the use of : might be ill-advised. It's just an example - any other concise notation would do as well. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury,

[Python-Dev] NotHashableError? (Re: dict containment annoyance)

2006-08-13 Thread Greg Ewing
otHashableError, that hash functions were expected to raise in this situation instead of a generic TypeError. For backwards compatibility it could be a subclass of TypeError. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/m

Re: [Python-Dev] Type of range object members

2006-08-15 Thread Greg Ewing
Martin v. Löwis wrote: > We had this discussion before; if you use ob_size==0 to indicate > that it's an int, this space isn't needed in a long int. What about int subclasses? -- Greg ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Type of range object members

2006-08-15 Thread Greg Ewing
Guido van Rossum wrote: > I worry that dropping the special allocator will be too slow. Surely there's some compromise that would allow recently-used ints to be kept around, but reclaimed if memory becomes low? -- Greg ___ Python-Dev mail

Re: [Python-Dev] Type of range object members

2006-08-15 Thread Greg Ewing
ere isn't? Actually a lot of APIs currently assumen that. Also it means you'd pay a penalty every time you access it, whereas presumably short ints are the case we want to optimise for speed as well. -- Greg ___ Python-Dev mailing list Python-

Re: [Python-Dev] Type of range object members

2006-08-16 Thread Greg Ewing
Martin v. Löwis wrote: > Greg Ewing schrieb: >>Also it means you'd pay a penalty every time you >>access it > > That penalty is already paid today. You'd still have that penalty, *plus* the overhead of bit masking to get at the value. Maybe that wouldn'

Re: [Python-Dev] Making 'python -t' the default.

2006-08-16 Thread Greg Ewing
Georg Brandl wrote: > Or disallow tabs altogether. -1. I'd be annoyed if Python started telling me I wasn't allowed to write my source the way my preferred editor (BBEdit) works best. Very annoyed. -- Greg ___ Python-Dev mailing li

Re: [Python-Dev] Doc suggestion for Elementtree (for 2.5? a bit late, I know...)

2006-08-28 Thread Greg Ewing
non-pep8-compliant module naming structure? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Doc suggestion for Elementtree (for 2.5? a bitlate, I know...)

2006-08-29 Thread Greg Ewing
Fredrik Lundh wrote: > ET was written years before the "certain modules should use camelcase" stuff > was removed from PEP 8. Maybe so, but I was hoping that additions to the stdlib in this day and age might be adapted to follow modern conventions instead of just being plonked in

Re: [Python-Dev] Adding an rslice() builtin?

2006-08-29 Thread Greg Ewing
Nick Coghlan wrote: >reversed(seq[start:stop:step]) becomes > seq[(stop-1)%abs(step):start-1:-step] > > An rslice builtin would make the latter version significantly easier to read: > >seq[rslice(start, stop, step)] How would this deal with omitted start and/or sto

Re: [Python-Dev] Signals, threads, blocking C functions

2006-09-10 Thread Greg Ewing
Jan Kanis wrote: > However, PyGTKs problem does get > solved, as long as there is _a_ thread that returns to the interpreter > within some timeframe. It seems plausible that this will happen. I don't see that this makes the situation much better, as it just shifts the need for polling to anoth

Re: [Python-Dev] Py_BuildValue and decref

2006-09-10 Thread Greg Ewing
that it *always* steals a reference, regardless of whether it succeeds or fails. I expect the same is true of Py_BuildValue. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http:/

Re: [Python-Dev] Py_BuildValue and decref

2006-09-11 Thread Greg Ewing
ur differs when it fails is awkward to use safely at best, impossible at worst (if there's no way of finding out what needs to be decrefed in order to clean up properly).] -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury,

Re: [Python-Dev] Signals, threads, blocking C functions

2006-09-11 Thread Greg Ewing
that buffer may fill and > we lose signals. That might be an argument for *not* trying to communicate the signal number by the value written to the pipe, but keep a separate set of signal-pending flags, and just use the pipe as a way of indicating that *something* has happened. -- Greg Ewing, C

Re: [Python-Dev] Signals, threads, blocking C functions

2006-09-11 Thread Greg Ewing
omputer architectures have become far too clever for their own good. :-( -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Grammar change in classdef

2006-09-16 Thread Greg Ewing
Talin wrote: > Is the result a new-style or classic-style class? It would be nice if > using the empty parens forced a new-style class... No, it wouldn't, IMO. Too subtle a clue. Best to just wait for Py3k when all classes will be new-styl

Re: [Python-Dev] New relative import issue

2006-09-18 Thread Greg Ewing
system structure. There really shouldn't be any such thing as sys.path -- the view that any given module has of the package namespace should depend only on where it is, not on the history of how it came to be invoked. -- Greg Ewing, Computer Science Dept, +--

Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Greg Ewing
7;s sufficient to be able to lock just one object at a time. Maybe it is, but some more formal consideration of that might be a good idea. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | Carpe post meridiem! | Chris

Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Greg Ewing
ct. What *looks* like read-only access at the Python level involves refcount updates just from the act of touching the object. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | Carpe post meridiem! | Christchurch, N

Re: [Python-Dev] deja-vu .. python locking

2006-09-18 Thread Greg Ewing
o go through the relevant motions, and see what timings are produced for single-threaded code. It wouldn't be a working implementation, but you'd find out pretty quickly if it were going to be a disaster. -- Greg Ewing, Computer Science Dept, +--

Re: [Python-Dev] deja-vu .. python locking

2006-09-19 Thread Greg Ewing
Martin Devera wrote: > Greg, what change do you have in mind regarding that "3 instruction > addition" to refcounting ? I don't have any change in mind. If even an atomic inc is too expensive, it seems there's no hope for us. -- Greg

Re: [Python-Dev] New relative import issue

2006-09-19 Thread Greg Ewing
of static information is the layout of the filesystem. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] New relative import issue

2006-09-21 Thread Greg Ewing
s in Eiffel), which is a kind of meta-language for describing the shape of the class namespace, and it allows each source file to have its own unique view of that namespace. I'm groping towards something equivalent for the Python module namespace. (AMP - Ass

Re: [Python-Dev] New relative import issue

2006-09-21 Thread Greg Ewing
Another thought on static module namespace configuration: It would make things a *lot* easier for py2exe, py2app and the like that have to figure out what packages a program depends on without running the program. -- Greg ___ Python-Dev mailing list

Re: [Python-Dev] New relative import issue

2006-09-21 Thread Greg Ewing
ue view of the module namespace, defined at the time the module is installed, that can't be disturbed by anything that any other module does. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

[Python-Dev] list.discard? (Re: dict.discard)

2006-09-21 Thread Greg Ewing
, and more efficient. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] New relative import issue

2006-09-21 Thread Greg Ewing
Guido van Rossum wrote: > While I agree with your idea(l), I don't think that's what Greg meant. > He clearly say "sys.path should not exist at all". Refining that a bit, I don't think there should be a *single* sys.path for the whole program -- more like each modu

Re: [Python-Dev] list.discard? (Re: dict.discard)

2006-09-22 Thread Greg Ewing
e item is not found. I don't think I've ever found getting an exception from it to be useful, and I've often found it a nuisance. What experiences have others had with it? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://ma

Re: [Python-Dev] weakref enhancements

2006-09-28 Thread Greg Ewing
ould probably use this technique more often. > So, before being entertained for addition to the standard library, this > idea should probably first be posted as an ASPN recipe, That's a reasonable idea. -- Greg ___ Python-Dev mailing list Pyth

Re: [Python-Dev] Python Doc problems

2006-09-28 Thread Greg Ewing
together, without going into low-level details. Then there was a "Reference" section that systematically went through and gave all the details of the API. While Inside Mac could often be criticised for omitting rather important info in either section now and then, I think they ha

Re: [Python-Dev] Caching float(0.0)

2006-09-29 Thread Greg Ewing
a frequent enough problem to be worth the effort. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] OT: How many other people got this spam?

2006-10-01 Thread Greg Ewing
hat would make good link partners" when obviously no human eye of theirs has actually seen my site. Addressing me as "Canterbury" in the To: line wasn't a good sign either. :-) I'm tempted to take them up on the offer and see whether they actual

Re: [Python-Dev] Cloning threading.py using proccesses

2006-10-11 Thread Greg Ewing
a python-version-independent protocol. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] ConfigParser: whitespace leading comment lines

2006-10-12 Thread Greg Willden
[0] in '#;':+    if line.strip() == '' or line.strip()[0] in '#;':     continueRegards,Greg Willden (Not a member of python-dev)-- Linux.  Because rebooting is for adding hardware. ___ Python-Dev mailing

Re: [Python-Dev] Cloning threading.py using proccesses

2006-10-12 Thread Greg Ewing
Fredrik Lundh wrote: > marshal hasn't changed in many years: Maybe not, but I was given to understand that it's regarded as a private format that's not guaranteed to remain constant across versions. So even if it happens not to change, it wouldn't be wise to

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Greg Ewing
perate on path objects. That would make sense, because the path algebra ought to be a closed set of operations that's tightly coupled to the platform's path semantics. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.py

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Greg Ewing
ed "file:". That's not to say there shouldn't be a function available that understands it, but I wouldn't want it built into all functions that take pathnames. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail

Re: [Python-Dev] PEP 355 status

2006-10-26 Thread Greg Ewing
try ) I don't think that expressing one platform's pathnames in the format of another is something you can do in general, e.g. going from Windows to Unix, what do you do with the drive letter? You can only really do it if you have some sort of network file system connect

Re: [Python-Dev] PEP 355 status

2006-10-26 Thread Greg Ewing
unlikely that such a platform will be invented in the foreseeable future (even classic MacOS *had* a notion of paths, even if it wasn't the preferred representation). So all this is probably YAGNI. -- Greg ___ Python-Dev mailing list Python-Dev@python.org htt

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-27 Thread Greg Ewing
out all the offsets (which is tedious, error-prone and hostile to modification)? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/arc

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-28 Thread Greg Ewing
Nick Coghlan wrote: > Greg Ewing wrote: >> Also, what if I want to refer to fields by name >> but don't want to have to work out all the offsets > Use the list definition form. With the changes I've > suggested above, you wouldn't even have to name the f

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-28 Thread Greg Ewing
it would make sense to expose the associated data layout descriptors as > array.datatype. Seem to me that arrays are a sub-concept of binary data, not the other way around. So maybe both arrays and data types should be in a module called 'binary' or some such. -- Greg __

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-28 Thread Greg Ewing
Travis E. Oliphant wrote: > The 'kind' does not specify how "big" the data-type (data-format) is. What exactly does "bit" mean in that context? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.p

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-28 Thread Greg Ewing
Travis E. Oliphant wrote: > How to handle unicode data-formats could definitely be improved. > Suggestions are welcome. 'U4*10' string of 10 4-byte Unicode chars Then for consistency you'd want 'S*10' rather than just 'S10' (or at le

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-29 Thread Greg Ewing
Travis E. Oliphant wrote: > Greg Ewing wrote: >>What exactly does "bit" mean in that context? > > Do you mean "big" ? No, you've got a data type there called "bit", which seems to imply a size, in contradiction to the size-independe

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-29 Thread Greg Ewing
ommunicate via this mechanism, or is that outside its scope? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-29 Thread Greg Ewing
worth including some features in the standard for describing pixel formats. Pygame seems to have a very detailed and flexible system for doing this, so it might be a good idea to have a look at that. -- Greg ___ Python-Dev mailing list Pytho

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-30 Thread Greg Ewing
butes distinguishing between struct, array, etc. That would be single-type but multi-object. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-30 Thread Greg Ewing
signed int 'u4' # 4-byte unsigned int 'u4b' # 4-bit unsigned int (Next we can have an argument about whether bit fields should be packed MSB-to-LSB or vice versa...:-) -- Greg ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-30 Thread Greg Ewing
s or trees). Yes, and more complex arrangements of types that reference each other. > If that is the case, then it's > easily supported once support for pointers is added. But it doesn't fit easily into the single-object model. -- Greg ___

Re: [Python-Dev] idea for data-type (data-format) PEP

2006-11-02 Thread Greg Ewing
getting a ctypes type corresponding to a given data layout description and vice versa. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/pyt

Re: [Python-Dev] PEP: Extending the buffer protocol to share array information.

2006-11-02 Thread Greg Ewing
Fredrik Lundh wrote: > the "right solution" for things like this is an *API* that lets you do > things like: > > view = object.acquire_view(region, supported formats) And how do you describe the "supported formats"? That's where Travis's propos

Re: [Python-Dev] Path object design

2006-11-02 Thread Greg Ewing
pret the second path in the context of the first". Having said that, I can see there could be an element of confusion in calling it "join". -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-11-02 Thread Greg Ewing
not necessarily another NumPy array. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] idea for data-type (data-format) PEP

2006-11-02 Thread Greg Ewing
ct should almost certainly be immutable. Since it's separated from the data it's describing, it's possible for one datatype object to describe multiple chunks of data. So you wouldn't want to mutate one in case it's being used for something

Re: [Python-Dev] Path object design

2006-11-02 Thread Greg Ewing
ed to tolerate the presence of a previous partial result when re-trying). It could be argued that shutil.copytree should clean up after itself if there is an error, but that might not be what you want -- e.g. you might want to find out how far it got, and maybe carry on from there next time. It'

Re: [Python-Dev] Path object design

2006-11-02 Thread Greg Ewing
ary can do about this. Whatever it tries to do, the fact will remain that it's impossible to have a regular file called "con", and users will have to live with that. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.p

Re: [Python-Dev] Path object design

2006-11-02 Thread Greg Ewing
a path that wasn't rooted in some existing absolute path. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-11-02 Thread Greg Ewing
n't want to do. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] idea for data-type (data-format) PEP

2006-11-02 Thread Greg Ewing
t an element datatype and a shape. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Path object design

2006-11-02 Thread Greg Ewing
Steve Holden wrote: > Greg Ewing wrote: > >>Having said that, I can see there could be an >>element of confusion in calling it "join". >> > > Good point. "relativise" might be appropriate, Sounds like something to make my computer go at warp sp

Re: [Python-Dev] Importing .pyc in -O mode and vice versa

2006-11-04 Thread Greg Ewing
along sys.path into memory and then go searching through that? -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

<    7   8   9   10   11   12   13   14   15   16   >