[Python-Dev] Re: PEP 654 except* formatting

2021-10-06 Thread Calvin Spealman
e archived at > https://mail.python.org/archives/list/python-dev@python.org/message/TW5I4Z3XKCSZC6IRXHNFVPZVLHEKI7O3/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER calvin.speal...@redhat.com M: +1.336.210.5107 [image:

[Python-Dev] Re: PEP 654 except* formatting

2021-10-05 Thread Calvin Spealman
To unsubscribe send an email to python-dev-le...@python.org > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/RGIAE2HMYQLPXWH5O5TNBNRXDQQ4UKAK/ > Code of Conduct: http://python.o

[Python-Dev] Re: PEP 654 except* formatting

2021-10-04 Thread Calvin Spealman
On Mon, Oct 4, 2021 at 12:48 PM Antoine Pitrou wrote: > On Mon, 4 Oct 2021 12:18:35 -0400 > Calvin Spealman wrote: > > On Mon, Oct 4, 2021 at 12:07 PM Guido van Rossum > wrote: > > > > > The question was about which style to *recommend* (a la PEP-8). > > >

[Python-Dev] Re: PEP 654 except* formatting

2021-10-04 Thread Calvin Spealman
ython.org > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/DASEBDJ6CK6U4YHRKPJ7CNQQHVWEWOLQ/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- CALVIN SPEA

[Python-Dev] Re: PEP 654 except* formatting

2021-10-04 Thread Calvin Spealman
/archives/list/python-dev@python.org/message/4B256YKUPW5P2M44GG5H6FBL3PSV6ODP/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER calvin.speal...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TEST

[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread Calvin Spealman
int(sample_string_1.lstrip("namespace/something-plugin")) > xx-extra:dev > > print(sample_string_1.lstrip("namespace/something-plug")) > xx-extra:dev > > print(sample_string_1.lstrip("namespace/something-plu")) > xx-extra:dev > > print(sample_strin

[Python-Dev] PEP-582 and multiple Python installations

2019-04-02 Thread Calvin Spealman
r new developers and I want to make that a better experience, not a more confusing one. Maybe that version number could include some other unique identify, maybe based on Python's own executable. A hash maybe? I don't know if anything like that already exists to uniquely identify a Python

Re: [Python-Dev] PEPs from non-core devs now need a sponsor

2019-03-05 Thread Calvin Spealman
opefully > this will make things smoother for those who are new to the PEP process. > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mai

Re: [Python-Dev] "Deprecation" of os.system in favor of subprocess?

2018-10-24 Thread Calvin Spealman
In the spirit of "There should be one-- and preferably only one --obvious way to do it." this makes perfect sense. The distinction between "your own machine and other peoples machines" is not always clear, nor planned for, nor understood by developers to be an important distinction to make up-fron

Re: [Python-Dev] Why can't I encode/decode base64 without importing a module?

2013-04-22 Thread Calvin Spealman
if two lines is cumbersome, you're in for a cumbersome life a programmer. On Apr 22, 2013 7:31 AM, "Ram Rachum" wrote: > Hi everyone, > > Take a look at this question: > > > http://stackoverflow.com/questions/16122435/python-3-how-do-i-use-bytes-to-bytes-and-string-to-string-encodings/16122472?no

Re: [Python-Dev] [RELEASED] Python 3.3.0 beta 1

2012-06-27 Thread Calvin Spealman
All, Congradulations. This is a big one! On Wed, Jun 27, 2012 at 2:10 AM, Georg Brandl wrote: > On behalf of the Python development team, I'm happy to announce the > first beta release of Python 3.3.0. > > This is a preview release, and its use is not recommended in > production settings. > >

[Python-Dev] Fwd: Re: Add os.path.resolve to simplify the use of os.readlink

2012-06-21 Thread Calvin Spealman
-- Forwarded message -- (whoops from my phone) On Jun 21, 2012 6:32 AM, "Armin Ronacher" wrote: > > Due to an user error on my part I was not using os.readlink correctly. > Since links can be relative to their location I think it would make sense > to provide an os.path.resolve he

Re: [Python-Dev] PEP 362 Second Revision

2012-06-09 Thread Calvin Spealman
On Thu, Jun 7, 2012 at 10:41 AM, Yury Selivanov wrote: > Hello, > > The new revision of PEP 362 has been posted: > http://www.python.org/dev/peps/pep-0362/ While the actual implementation is more complex, the PEP is a lot more clear and direct than it first was. Great job! I'm really looking for

Re: [Python-Dev] JITted regex engine from pypy

2012-06-03 Thread Calvin Spealman
On Sun, Jun 3, 2012 at 7:49 AM, Maciej Fijalkowski wrote: > Hi > > I was reading a bit about the regex module and I would like to present some > other solution into speeding up the re module for Python. > > So, as a bit of background - pypy has a re compatible module. It's also > JITted and it's a

Re: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3

2012-05-20 Thread Calvin Spealman
On Sun, May 20, 2012 at 4:28 PM, Benjamin Peterson wrote: > 2012/5/20 Nick Coghlan : >> PEP 3135 defines the new zero-argument form of super() as implicitly >> equivalent to super(__class__, ), and up until 3.2 has >> behaved accordingly: if you accessed __class__ from inside a method, >> you woul

Re: [Python-Dev] Backporting PEP 414

2012-02-29 Thread Calvin Spealman
On Feb 28, 2012 7:14 PM, wrote: >> >> Why is readding u'' a feature and not a bug? > > > There is a really simple litmus test for whether something is a bug: > does it deviate from the specification? > > In this case, the specification is the grammar, and the implementation > certainly doesn't dev

Re: [Python-Dev] Fixing the XML batteries

2012-02-06 Thread Calvin Spealman
On Dec 9, 2011 3:04 AM, "Stefan Behnel" wrote: > > Hi everyone, > > I think Py3.3 would be a good milestone for cleaning up the stdlib support for XML. Note upfront: you may or may not know me as the maintainer of lxml, the de-facto non-stdlib standard Python XML tool. This (lengthy) post was trig

Re: [Python-Dev] [PEP 3148] futures - execute computations asynchronously

2010-03-05 Thread Calvin Spealman
I revert my objections. I still would like to see this in use "in the wild" and I might even use it thusly, myself. On Fri, Mar 5, 2010 at 9:50 AM, Jesse Noller wrote: > On Fri, Mar 5, 2010 at 7:45 AM, Calvin Spealman wrote: >> A young library solving an old problem in a way

Re: [Python-Dev] [PEP 3148] futures - execute computations asynchronously

2010-03-05 Thread Calvin Spealman
A young library solving an old problem in a way that conflicts with many of the other implementations available for years and with zero apparent users in the wild is not an appropriate candidate for a PEP. On Fri, Mar 5, 2010 at 1:03 AM, Brian Quinlan wrote: > Hi all, > > I recently submitted a d

Re: [Python-Dev] To 3.0.2 or not to 3.0.2?

2009-02-16 Thread Calvin Spealman
FWIW; I think a 3.0.2 would be useful socially (even volunteer projects have marketting issues to consider). It says "we are committed to making 3.x work", while the quick jump to 3.1 with only a limited minor fix release to 3.0 says "we stumbled into this and have to just brush this under the rug.

Re: [Python-Dev] multiprocessing not compatible with functional.partial

2009-02-12 Thread Calvin Spealman
On Thu, Feb 12, 2009 at 9:06 AM, Christian Heimes wrote: > Neal Becker schrieb: >> If the argument to pool.map (f, args) >> is >> f = functional.partial (my_func, some_keyword_arg=whatever) >> >> I get: >> >> Traceback (most recent call last): >> File "/usr/lib/python2.5/site-packages/multiproce

Re: [Python-Dev] yield * (Re: Missing operator.call)

2009-02-07 Thread Calvin Spealman
All of this debate is moot without the foundation of a common library on which we would be building these coroutines. Any proposal of a specific coroutine syntax is worthless without a time and community tested coroutine implementation, which would be subject to the same rigerous inclusion requirem

Re: [Python-Dev] The interpreter accepts f(**{'5':'foo'}); is this intentional?

2009-02-05 Thread Calvin Spealman
I would favor this not being constrained. I don't want every use of ** to cause a pattern match to verify each key. I would even be fine without the check for being strings. Define what it should be, but let the implementation be lax. It is no different from any other place where you need to know i

Re: [Python-Dev] Partial function application 'from the right'

2009-02-03 Thread Calvin Spealman
http://bugs.python.org/issue1706256 Took me a couple days to catch up on this thread so here is the link for any interested. Could it be possible to reevaluate this? On Sat, Jan 31, 2009 at 2:40 PM, Leif Walsh wrote: > On Fri, Jan 30, 2009 at 7:38 PM, Calvin Spealman wrote: >>

Re: [Python-Dev] Partial function application 'from the right'

2009-01-30 Thread Calvin Spealman
I am just replying to the end of this thread to throw in a reminder about my partial.skip patch, which allows the following usage: split_one = partial(str.split, partial.skip, 1) Not looking to say "mine is better", but if the idea is being given merit, I like the skipping arguments method better

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Calvin Spealman
On Tue, Jan 20, 2009 at 12:46 PM, Gerald Britton wrote: > I wonder if this is a bug? I don't think so, but its interesting nonetheless. passing a generator expression to list() involves two loops: the list construction and the generator expression. So, a StopIteration from whatever the GE is ite

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Calvin Spealman
On Tue, Jan 20, 2009 at 12:00 PM, Vitor Bosshard wrote: > > > - Mensaje original >> De: Gerald Britton >> Para: Vitor Bosshard >> CC: python-3...@udmvt.ru; python-dev@python.org >> Enviado: martes, 20 de enero, 2009 13:40:07 >> Asunto: Re: [Python-Dev] PEP 3142: Add a "while" clause to

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-19 Thread Calvin Spealman
ne, but it is a more consistent syntax. It has the obvious problem of looking like it might allow an alternative expression, like the if-expression. prime = (p for p in sieve() if p < 1000 else break) On Mon, Jan 19, 2009 at 11:47 AM, Calvin Spealman wrote: > On Mon, Jan 19, 2009 at 11:

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-19 Thread Calvin Spealman
g used all that often. Not nearly often enough to warrant replacing it with a special syntax! Only 178 results from Google CodeSearch, while chain, groupby, and repeat get 4000, 3000, and 1000 respectively. Should those be given their own syntax? > On Mon, Jan 19, 2009 at 11:29 AM, Calvin Speal

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-19 Thread Calvin Spealman
I am really unconvinced of the utility of this proposal and quite convinced of the confusing factor it may well add to the current syntax. I would like to see more applicable examples. It would replace uses of takewhile, but that isn't a really often used function. So, is there any evidence to supp

Re: [Python-Dev] Single Sign-On for *.python.org

2009-01-18 Thread Calvin Spealman
I would like to see that kind of coherence. I think anything that gets in the way of someone getting in is in danger of holding someone off from contributing something, be it wiki edits, bug reports, or packages. One might also ask about the mailman lists here. On Sun, Jan 18, 2009 at 2:21 PM, ana

Re: [Python-Dev] Nonlocal shortcut

2008-12-08 Thread Calvin Spealman
Did the original PEP discussion cover debates about the shortcut working for all assignment operators (like += and x[i] =) and the difference between it being one-shot (doesnt affect x for the rest of the function) or simply the unrolling into nonlocal x; x= y as it is? On Mon, Dec 8, 2008 at 5:07

[Python-Dev] Summaries for Number 2008, First Half

2008-11-15 Thread Calvin Spealman
Wow, how long has this been? OK, so these aren't really the summaries. It is half-done summaries, which I've posted to the wiki for community collaboration. Anyone with a better understanding a conversation or simply the knowledge that I don't know what I'm talking about half the time, the summary

Re: [Python-Dev] Using Cython for standard library?

2008-11-03 Thread Calvin Spealman
On Mon, Nov 3, 2008 at 6:29 AM, Gerhard Häring <[EMAIL PROTECTED]> wrote: > Stefan Behnel wrote: >> >> Michael Foord wrote: >>> >>> Moving more C extensions to an implementation based on ctypes would be >>> enormously useful for PyPy, IronPython and Jython, but ctypes is not yet >>> as portable as

Re: [Python-Dev] Fwd: Removal of GIL through refcounting removal.

2008-10-31 Thread Calvin Spealman
Has anyone made the argument for keeping the GIL to discourage threading? I'm only throwing this out there and I'm sure we'd want to improve things no matter what, but I would like to voice the concern anyway. We all know there are people who think threading is the answer to all things, and who don

Re: [Python-Dev] My patches

2008-10-30 Thread Calvin Spealman
On Thu, Oct 30, 2008 at 8:50 AM, Barry Warsaw <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Oct 30, 2008, at 01:02 PM, Victor Stinner wrote: > >If Python would be more reactive, more developer will be attracted. The > >communication is very important in an op

Re: [Python-Dev] An OO API for doctest / unittest integration...

2008-08-12 Thread Calvin Spealman
You need to bring this sort of thing up in python-ideas before here, first of all. Also, there isnt a strong case for including a module that is only used by one project somewhere. Promote it on its own, outside of this other project. Let other people use it and get feedback from real use. When its

Re: [Python-Dev] update_wrapper should preserve staticmethod behavior

2008-06-11 Thread Calvin Spealman
per() patch to at least become staticmethod smart. On Jun 11, 2008, at 1:48 PM, Antoine Pitrou wrote: Calvin Spealman socialserve.com> writes: Traceback (most recent call last): File "", line 1, in File "", line 3, in A File "", line 5, in d File &q

[Python-Dev] update_wrapper should preserve staticmethod behavior

2008-06-11 Thread Calvin Spealman
I'd like to make a claim about the following example, that update_wrapper should be improved to preserve the behavior of known, built-in decorators. In this case, I'm talking about staticmethod. The order I list here feels natural, but it obviously doesn't work. The only reason it doesn't s

Re: [Python-Dev] long(float('nan')) conversion

2008-01-04 Thread Calvin Spealman
Yes, I realize now that I was on the wrong box running the wrong version, so ignore me if I'm stupid and its irrelevant! On Jan 4, 2008 9:02 AM, Calvin Spealman <[EMAIL PROTECTED]> wrote: > On Jan 4, 2008 8:07 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > &g

Re: [Python-Dev] long(float('nan')) conversion

2008-01-04 Thread Calvin Spealman
On Jan 4, 2008 8:07 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Hello! > > Bug http://bugs.python.org/issue1481296 describes a problem where > long(float('nan')) causes a seg fault on Mac OS X. On other platforms it > returns 0L, e.g. > > Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) > [GC

[Python-Dev] 1-tuple trailing comma

2007-12-18 Thread Calvin Spealman
I just had an issue brought up by another developer who had a trailing comma on an assignment causing a 1-tuple he did not expect. We were talking about it and came to the conclusion that it is at least worth bringing up the idea of enforcing a SyntaxError in the case of this. 1-tuple synta

Re: [Python-Dev] sliceobject Py_None step inquiry

2007-12-11 Thread Calvin Spealman
I think that should not change. None is different than 0. It makes sense to use it as a "use the default value" kind of place holder. Silently using 1 when you pass 0 is a very different thing. Maybe the slice was calculated and the developer should know about it being 0, because in this cas

[Python-Dev] Terminology of "Iterable" and "Iterator"

2007-07-25 Thread Calvin Spealman
I got into a discussion about this, which made me think it would make sense to formalize a distinction between "iterable" and "iterator". To nearly any python developer I talk with, we can define them as: iterable - An object which can be passed to the built-in iter() function, which returns an it

[Python-Dev] Sorry About Summaries

2007-07-18 Thread Calvin Spealman
I completely intend to finish the backlog of summaries, but I've reached the point that I know it is futile to continue thinking I'll be able to fit in the time for the summaries in an on-going and reliable manner. When I took on the responsibility, it was looking like time would be fine. Since the

[Python-Dev] Commit Keys

2007-05-06 Thread Calvin Spealman
I lost the key I originally gave for commiting my summaries. Who do I talk to about fixing that? -- Read my blog! I depend on your acceptance of my opinion! I am interesting! http://ironfroggy-code.blogspot.com/ ___ Python-Dev mailing list Python-Dev@py

Re: [Python-Dev] New Super PEP

2007-05-01 Thread Calvin Spealman
ROTECTED]> wrote: > On 4/29/07, Calvin Spealman <[EMAIL PROTECTED]> wrote: > > Draft Attempt Number Duo: > > > > PEP: XXX > > Title: New Super > > Checked in as PEP 3133. > > -- > --Guido van Rossum (home page: http://www.python.org/~guido/) > --

Re: [Python-Dev] Python 2.5.1

2007-05-01 Thread Calvin Spealman
On 5/1/07, Kristján Valur Jónsson <[EMAIL PROTECTED]> wrote: > Hm, I fail to see the importance of a special regression test for that > peculiar file then with its special magical OS properties. Why not focus > our attention on real, user generated files?. (Try to stick to the posting conventions

Re: [Python-Dev] New Super PEP

2007-04-30 Thread Calvin Spealman
On 4/30/07, Armin Rigo <[EMAIL PROTECTED]> wrote: > Hi Calvin, > > On Mon, Apr 30, 2007 at 08:34:56AM -0400, Calvin Spealman wrote: > > If you want, you can also grab the reference > > implementation from my blog: http://ironfroggy-code.blogspot.com/ > > This r

Re: [Python-Dev] [Python-3000] Pre-pre PEP for 'super' keyword

2007-04-30 Thread Calvin Spealman
On 4/30/07, Tim Delaney <[EMAIL PROTECTED]> wrote: > I've been working on improved super syntax for quite a while now - my > original approach was 'self.super' which used _getframe() and mro crawling > too. I hit on using bytecode hacking to instantiate a super object at the > start of the method t

Re: [Python-Dev] New Super PEP

2007-04-30 Thread Calvin Spealman
On 4/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > James> I did not intend to imply that it should be impossible to pass > James> different arguments, only that passing the same ones should be > James> foolproof and not require repeating yourself. > > Then some other argument

Re: [Python-Dev] [Python-3000] Pre-pre PEP for 'super' keyword

2007-04-30 Thread Calvin Spealman
On 4/30/07, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > >> 1. When a method is defined, the class is bound to it via an > attribute > >> (which in my version is called func_class). > > > In Py3k all the func_XXX attrs are renamed __XXX__, so this would be > > __c

Re: [Python-Dev] [Python-3000] Pre-pre PEP for 'super' keyword

2007-04-29 Thread Calvin Spealman
ment a sys._getframe() and a IronPython currently doesn't, but seems to plan on it (there is a placeholder, at present). I am not sure if notes on this belongs in the PEP or not. Draft Three follows for all. I think I'm turning off e-mail for the rest of this evening, so I'll ca

Re: [Python-Dev] [Python-3000] Pre-pre PEP for 'super' keyword

2007-04-29 Thread Calvin Spealman
On 4/29/07, Jim Jewett <[EMAIL PROTECTED]> wrote: > On 4/29/07, Tim Delaney <[EMAIL PROTECTED]> wrote: > > I've been intending to write up a PEP for fixing super, but I haven't had > > time to get to it. > > Calvin Spealman has the most recent draft.

Re: [Python-Dev] New Super PEP

2007-04-29 Thread Calvin Spealman
On 4/29/07, Collin Winter <[EMAIL PROTECTED]> wrote: > On 4/29/07, Calvin Spealman <[EMAIL PROTECTED]> wrote: > > On 4/29/07, Collin Winter <[EMAIL PROTECTED]> wrote: > > > What if the instance isn't called "self"? PEP 3099 states that "

Re: [Python-Dev] New Super PEP

2007-04-29 Thread Calvin Spealman
On 4/29/07, Collin Winter <[EMAIL PROTECTED]> wrote: > On 4/29/07, Calvin Spealman <[EMAIL PROTECTED]> wrote: > > The PEP defines the proposal to enhance the super builtin to work implicitly > > upon the class within which it is used and upon the instance the current

Re: [Python-Dev] New Super PEP

2007-04-29 Thread Calvin Spealman
On 4/29/07, Armin Rigo <[EMAIL PROTECTED]> wrote: > Hi Calvin, > > On Sat, Apr 28, 2007 at 10:43:04PM -0400, Calvin Spealman wrote: > > The proposal adds a dynamic attribute lookup to the super type, which will > > automatically determine the proper class and insta

Re: [Python-Dev] Python 2.5.1

2007-04-29 Thread Calvin Spealman
On 4/29/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Calvin Spealman schrieb: > > On 4/29/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > >> Right. It shouldn't fail if the file is absent (it shouldn't > >> pass in that

Re: [Python-Dev] New Super PEP

2007-04-29 Thread Calvin Spealman
On 4/29/07, Collin Winter <[EMAIL PROTECTED]> wrote: > On 4/29/07, Calvin Spealman <[EMAIL PROTECTED]> wrote: > [snip] > > I still wasn't really aware of any alternative suggestions that need > > to be included in this. > > Here are two off the top of my

Re: [Python-Dev] Python 2.5.1

2007-04-29 Thread Calvin Spealman
On 4/29/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Right. It shouldn't fail if the file is absent (it shouldn't > pass in that case, either, but regrtest has no support for INCONCLUSIVE > test outcomes). Perhaps that could become part of the improvements made through test.test_support.Test

Re: [Python-Dev] New Super PEP

2007-04-29 Thread Calvin Spealman
On 4/29/07, Calvin Spealman <[EMAIL PROTECTED]> wrote: > Draft Attempt Number Duo: > > PEP: XXX > Title: New Super > Version: $Revision$ > Last-Modified: $Date$ > Author: Calvin Spealman <[EMAIL PROTECTED]> > Status: Draft > Type: Standards Track > Conte

Re: [Python-Dev] New Super PEP

2007-04-29 Thread Calvin Spealman
Draft Attempt Number Duo: PEP: XXX Title: New Super Version: $Revision$ Last-Modified: $Date$ Author: Calvin Spealman <[EMAIL PROTECTED]> Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 28-Apr-2007 Python-Version: 2.6 Post-History: 28-Apr-2007, 29-Apr-2007 Ab

Re: [Python-Dev] Python 2.5.1

2007-04-29 Thread Calvin Spealman
On 4/29/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > The > > original test failed, my new one does not. > > Then this change is incorrect: the test should fail in 2.5.0. I think I don't get why the test _must_ fail. If it fails, I assumed something was broken. If it failed because it was t

Re: [Python-Dev] New Super PEP

2007-04-29 Thread Calvin Spealman
On 4/29/07, Collin Winter <[EMAIL PROTECTED]> wrote: > What if the instance isn't called "self"? PEP 3099 states that "self > will not become implicit"; it's talking about method signatures, but I > think that dictum applies equally well in this case. I don't use the name self. I use whatever the

Re: [Python-Dev] Python 2.5.1

2007-04-29 Thread Calvin Spealman
On 4/29/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > >> As I said - I'm not convinced that is indeed correct. Before accepting > >> a replacement test I would like confirmation that this test will fail > >> on 2.5.0. You might not get ERROR_SHARING_VIOLATION in all cases of > >> open files wi

Re: [Python-Dev] New Super PEP

2007-04-29 Thread Calvin Spealman
Yes, I bad wordly things did. Fix will I. On 4/29/07, Talin <[EMAIL PROTECTED]> wrote: > Calvin Spealman wrote: > > Comments welcome, of course. Bare with my first attempt at crafting a PEP. > > See below for comments; In general, I'm having problems understanding &

Re: [Python-Dev] Python 2.5.1

2007-04-29 Thread Calvin Spealman
On 4/29/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > On Windows there is no guarantee that there will be a pagefile.sys on > > the C drive, or even that there exists a C drive. The test checking for > > the result of os.stat('C:\\pagefile.sys') is broken. Create a temporary > > file, open

Re: [Python-Dev] Python 2.5.1

2007-04-29 Thread Calvin Spealman
On 4/29/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > I'm sorry, but somehow I could not parse this. My understanding was > > that the unittest was meant to make sure an os.stat call would be > > successful on an open file, and that pagefile.sys was simply used as a > > known open file, whic

Re: [Python-Dev] Python 2.5.1

2007-04-28 Thread Calvin Spealman
On 4/28/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > I have a patch myself that creates an open file and uses that as the > > test. My reasoning is that pagefile.sys was chosen as a file that > > should always exist and be open, so its safe to test against, so we > > should just be testing

[Python-Dev] New Super PEP

2007-04-28 Thread Calvin Spealman
Comments welcome, of course. Bare with my first attempt at crafting a PEP. PEP: XXX Title: Super As A Keyword Version: $Revision$ Last-Modified: $Date$ Author: Calvin Spealman <[EMAIL PROTECTED]> Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 30-Apr-2007 Python-Versio

Re: [Python-Dev] Python 2.5.1

2007-04-28 Thread Calvin Spealman
On 4/28/07, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Sat, 28 Apr 2007 09:32:57 -0400, Raghuram Devarakonda <[EMAIL PROTECTED]> > wrote: > >On 4/28/07, Calvin Spealman <[EMAIL PROTECTED]>

[Python-Dev] April 1-15, 2007 Summaries Final Draft

2007-04-28 Thread Calvin Spealman
If no one has any further comments over the weekend and Monday, I'll post it as the final summary that evening/night. = Announcements = = Summaries = --- About SSL tests --- An open bug about missing SSL tests (#451607) was brought

Re: [Python-Dev] Python 2.5.1

2007-04-28 Thread Calvin Spealman
On 4/27/07, Khalid A. Bakr <[EMAIL PROTECTED]> wrote: > Okay. It seems I mixed up WindowsError with the > exception e in my post; at least it is now known that > e is not a number. The patch is short and is as > follows: > > Index: Lib/test/test_os.py > =

[Python-Dev] Automatic Scope Macros

2007-04-24 Thread Calvin Spealman
Could we use and add this macro to object.h? It could be a much cleaner and safer way of dealing with new references you want to clean up in the same scope. The first one will make sure to decref your new reference when you are done with it. The second one will make sure to set a borrowed reference

[Python-Dev] Summaries and the New Lists

2007-04-24 Thread Calvin Spealman
Now that I should be able to actually keep up with my summary duties, I need to figure out how to tackle the changing landscape of the development lists. The old summaries were no problem, before my time. When the python-3000 list was created, nearly everything was just conceptual, floaty talk that

Re: [Python-Dev] Python-Dev Summary Draft (April 1-15, 2007)

2007-04-24 Thread Calvin Spealman
On 4/24/07, Talin <[EMAIL PROTECTED]> wrote: > Calvin Spealman wrote: > > I have not gotten any replies about this. No comments, suggestions for > > not skipping any missed threads, or corrections. Is everyone good with > > this or should I give it another day or two? &g

Re: [Python-Dev] Python-Dev Summary Draft (April 1-15, 2007)

2007-04-24 Thread Calvin Spealman
I have not gotten any replies about this. No comments, suggestions for not skipping any missed threads, or corrections. Is everyone good with this or should I give it another day or two? On 4/22/07, Calvin Spealman <[EMAIL PROTECTED]> wrote: > There were a good number of skipped threads,

[Python-Dev] Patch to skip positional arguments with partials

2007-04-23 Thread Calvin Spealman
I posted about this on python-ideas, and didn't get any objections about the idea itself, so I took the opportunity to dive into the C API and get my hands dirty. I posted the idea and patch as a report on SF (1706256). For anyone interested at least to look over, I'm also just including the small

[Python-Dev] Python-Dev Summary Draft (April 1-15, 2007)

2007-04-21 Thread Calvin Spealman
There were a good number of skipped threads, but I've been out of the loop with a lot of busy things keeping me away from such things. Now that I'm getting back into it, I'll keep up with things again. So, let me know if any of the skipped threads should be brought in. Corrections and comments welc

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-12 Thread Calvin Spealman
I'll take this opportunity to pipe in with a response, since Guido summed up the many issues nicely and its a good bouncing point to mention my own thoughts. On 2/12/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > My perspective: > > - There's a lot of support for the basic idea, and only a few

Re: [Python-Dev] buglet in long("123\0", 10)

2007-01-18 Thread Calvin Spealman
On 1/18/07, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Calvin Spealman wrote: > > Added a check in test_long.LongTest.test_misc() that long("123\0", 10) > > fails properly and adapted the patch to int_new to long_new. I get > > this weird feeling th

Re: [Python-Dev] buglet in long("123\0", 10)

2007-01-16 Thread Calvin Spealman
me > up with a patch for long too. > > Getting the size won't help (exactly), since the problem is the diff > between strlen() and the size. You can see this in the int() fix. > > Let me know if you have any questions. It would be great if you could > produce a patch. > >

Re: [Python-Dev] buglet in long("123\0", 10)

2007-01-14 Thread Calvin Spealman
Is it a more general problem that null-terminated strings are used with data from strings we specifically allow to contain null bytes? Perhaps a migration of *FromString() to *FromStringAndSize() functions, or taking Python string object pointers, would be a more general solution to set as a goal,

Re: [Python-Dev] Rewrite of import in Python source (sans docs) is complete

2007-01-14 Thread Calvin Spealman
I am really looking into get into hacking on CPython and I'm keenly interested in your security work (my top reason for hoping i can make PyCon. keeping fingers crossed!), so if you need help with this to focus on other things, I'd be delighted to try my hand at the task. Do you have some docs up a

[Python-Dev] DRAFT: pydev summary for 2006-12-01 to 2006-12-15

2007-01-08 Thread Calvin Spealman
ctual work, rather than debating and theory-talk, is going on there. Sincerly, Your new summary writer, Calvin Spealman = Summaries = - [NPERS] Re: a feature i'd like to see in python #2: indexing of mat

Re: [Python-Dev] Cached Property Pattern

2006-12-29 Thread Calvin Spealman
Broytmann <[EMAIL PROTECTED]> wrote: > http://mail.python.org/pipermail/python-dev/2005-September/056782.html > > On Fri, Dec 29, 2006 at 02:40:05AM -0500, Calvin Spealman wrote: > > To this end, should a cachedproperty builtin be included to do this > >The issue was dis

[Python-Dev] Cached Property Pattern

2006-12-28 Thread Calvin Spealman
A very common pattern in using properties is as follows: class Foo(object): @property def c(self): if not hasattr(self, '_c'): self._c = some_operation(self.a, self.b) return self._c Basically, the common usage is to only calculate a properties value once, and

[Python-Dev] if __debug__: except Exception, e: pdb.set_trace()

2006-10-09 Thread Calvin Spealman
I know I can not do this, but what are the chances on changing the rules so that we can? Basically, since the if __debug__: lines are processed before runtime, would it be possible to allow them to be used to control the inclusion or omission or entire blocks (except, else, elif, etc.) with them be

Re: [Python-Dev] hasattr and properties

2005-12-07 Thread Calvin Spealman
On 12/7/05, Greg Ewing <[EMAIL PROTECTED]> wrote: > Thomas Lotze wrote: > > > Apparently, when applied to a class instance, hasattr calls getattr and > > decides that the attribute doesn't exist if the call raises any exception. > > - Wouldn't it make sense to only report a missing attribute if an

Re: [Python-Dev] Behavoir question.

2005-11-15 Thread Calvin Spealman
On 11/15/05, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Since I am fiddling with int/long conversions to/from string: > > Is the current behavior intentional (or mandatory?): > > v = int(' 5 ') > works, but: > v = int(' 5

Re: [Python-Dev] Early PEP draft (For Python 3000?)

2005-10-16 Thread Calvin Spealman
On 10/16/05, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > Calvin Spealman <[EMAIL PROTECTED]> wrote: > > > > On 10/14/05, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > > > > > Calvin Spealman <[EMAIL PROTECTED]> wrote: >

Re: [Python-Dev] Early PEP draft (For Python 3000?)

2005-10-16 Thread Calvin Spealman
On 10/14/05, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > Calvin Spealman <[EMAIL PROTECTED]> wrote: > > > > On 10/11/05, Eyal Lotem <[EMAIL PROTECTED]> wrote: > > > locals()['x'] = 1 # Quietly fails! > > > Replaced b

Re: [Python-Dev] Definining properties - a use case for class decorators?

2005-10-16 Thread Calvin Spealman
On 10/16/05, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 10/16/05, Nick Coghlan <[EMAIL PROTECTED]> wrote: > > On and off, I've been looking for an elegant way to handle properties using > > decorators. > > > > It hasn't really worked, because decorators are inherently single function, > > and

Re: [Python-Dev] Early PEP draft (For Python 3000?)

2005-10-13 Thread Calvin Spealman
On 10/11/05, Eyal Lotem <[EMAIL PROTECTED]> wrote: > locals()['x'] = 1 # Quietly fails! > Replaced by: > frame.x = 1 # Raises error What about the possibility of making this hypothetic frame object an indexable, such that frame[0] is the current scope, frame[1] is the calling scope, et

[Python-Dev] Fwd: defaultproperty

2005-10-09 Thread Calvin Spealman
Sorry, Nick. GMail, for some reason, doesn't follow the reply-to properly for python-dev. Forwarding to list now... On 10/9/05, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Jim Fulton wrote: > > Based on the discussion, I think I'd go with defaultproperty. > > > > Questions: > > > > - Should this be

Re: [Python-Dev] Removing the block stack (was Re: PEP 343 and __with__)

2005-10-09 Thread Calvin Spealman
On 10/6/05, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 10:09 PM 10/5/2005 -0700, Neal Norwitz wrote: > >The general idea is to allocate the stack in one big hunk and just > >walk up/down it as functions are called/returned. This only means > >incrementing or decrementing pointers. This should

Re: [Python-Dev] Simplify the file-like-object interface

2005-09-13 Thread Calvin Spealman
On 9/13/05, Andrew Durdin <[EMAIL PROTECTED]> wrote: > On 9/6/05, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > > > > One could use "class decorators". For example if you want to define the > > method foo() in a file-like class, you could use code like: > > I like the sound of this. Suppose there we

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-13 Thread Calvin Spealman
On 9/9/05, Guido van Rossum <[EMAIL PROTECTED]> wrote: > While I laugh at the naive view of people who write things like > "Interface equality and neutrality would be a good thing in the > language" and seriously (? I didn't see a smiley) use this argument to > plead for not making print() a built-

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-08 Thread Calvin Spealman
On 9/6/05, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 9/5/05, Calvin Spealman <[EMAIL PROTECTED]> wrote: > > There is a lot of debate over this issue, obviously. Now, I think > > getting rid of the print statement can lead to ugly code, because a > > wri

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-05 Thread Calvin Spealman
On 9/1/05, Guido van Rossum <[EMAIL PROTECTED]> wrote: > [Charles Cazabon] > > >> Perhaps py3k could have a py2compat module. Importing it could have the > > >> effect of (for instance) putting compile, id, and intern into the global > > >> namespace, making print an alias for writeln, > > [Greg

  1   2   >