<br><br><div><span class="gmail_quote">On 12/18/06, <b class="gmail_sendername">Guido van Rossum</b> &lt;<a href="mailto:guido@python.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">guido@python.org
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 12/18/06, Brett Cannon &lt;<a href="mailto:brett@python.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">brett@python.org</a>&gt; wrote:<br>&gt; I always wondered about that due date and when you really wanted to cut an
<br>&gt; alpha.<br><br>Despite what the PEP says I've always *thought* of it as &quot;early 2007&quot;
<br>which I can stretch to June but not much beyond. :-)</blockquote><div><br>Gotcha. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

&gt; I know the reason I didn't jump in on the refactoring tool is that a) I was<br>&gt; wondering how Jeremy's tool fit into all of this (if at all),<br><br>I think Jeremy's version is de-facto dead. I discussed the two
<br>
approaches briefly with him, when my version was about as lame as his.<br>I never could get his version to produce valid output even from the<br>example checked in; it seems to work for him and only for him. When I<br>explained how I am doing it he seemed to agree that it's better to get
<br>the tokens and the tree from the same parser and in the same parsing<br>run -- that approach just didn't appear possible to him because he<br>wasn't aware of (or had forgotten about) the pgen reimplementation in<br>Python donated by Elemental, that is the crucial centerpiece of my
<br>version.</blockquote><div><br>OK, glad to have that cleared up. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; b) I am busy
<br>&gt; with the import rewrite, c) my laptop is *still* in the shop and thus I<br>&gt; can't hack at home, and d) it doesn't interest me as much as other things I<br>&gt; want to do for Py3K.<br><br>Fair enough for sample of one. While I didn't mention the import
<br>rewrite, I hope that it will land in Py3k.</blockquote><div><br>OK.&nbsp; I will try to get it bootstrapped in then. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

&gt; A Python pie-in-the-sky list (python-ideas?) seems reasonable.&nbsp;&nbsp;Let's<br>&gt; python-dev focus on maintaining the current code, python-3000 on<br>&gt; Py3K-specific work, and the ideas list to be where new ideas are vetted out
<br>&gt; and congealed into a PEP to bring to either python-3000 or python-dev.<br><br><a href="mailto:py-in-the-sky@python.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">py-in-the-sky@python.org
</a> anyone?</blockquote><div><br>Quaint.&nbsp; I can live with that. <br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; &gt; - optional signature annotations (but without type checking<br>&gt; &gt; connotations); 
e.g. ``def foo(a: 42) -&gt; &quot;hello kitty&quot;: pass'' should<br>&gt; &gt; be fine; see my Artima blogs<br>&gt;<br>&gt; I have been thinking about this one, especially after the discussions of the<br>&gt; patch floating around that has an initial implementation.&nbsp;&nbsp;I was planning on
<br>&gt; tackling this at some point so it was nice and simple (just store strings<br>&gt; instead of actual types so it truly just documentation initially) and tied<br>&gt; into my signature PEP.<br><br>Oops, I must have missed that there is a patch. Where?
</blockquote><div><br>I mis-spoke.&nbsp; Tony Lownds has one but I didn't see a link in any of his emails to the code. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
When you say &quot;just store strings&quot; do you mean that the implementation<br>would be limited to strings or just that you would only use it to<br>store per-argument docstrings? The latter is fine with me; the former
<br>seems an unnecessary restriction.</blockquote><div><br>So code objects would grow a co_annotations that would be a tuple of strings that stored what the annotations were as strings, with the last slot reserved for returns.&nbsp; Any parameter that didn't have an annotation would have None assigned to it.&nbsp; This means that this code::
<br><br>&nbsp; def fxn(a:int, b, c:str='hi') -&gt; float: pass<br><br>would have a co_annotations of ``('int', None, 'str', float)``.&nbsp; Keeping everything as strings keeps it simple and minimizes any performance impact from them being declared.&nbsp; People can then easily write decorators that read the tuple (or use signature objects) to type-check as desired.
<br><br>Tony's implementation seems to actually fetch from globals what the annotation specifies and I just don't think that is necessary and unneeded overhead.&nbsp; Then again, functions are only created once and extra overhead could help discourage too much usage.&nbsp; But using strings and None like this cleanly solves the ambiguity issue of what value represents when no annotation was set (object, type?).
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; &gt; Perhaps the most controversial issue that I'd like to tackle is a<br>
&gt; &gt; standard library reorganization. This is so controversial that I don't<br>&gt; &gt; even know where to begin. Maybe the refactoring tool will be able to
<br>&gt; &gt; help and can automatically convert imports using old locations to<br>&gt; &gt; imports using new locations? Then if the new locations are also made<br>&gt; &gt; available in Python 2.6, we'd even have an upgrade path. Who wants to
<br>&gt; &gt; help out here? There's a huge amount of work and if it is left to me<br>&gt; &gt; it won't get done.<br>&gt;<br>&gt; Well, I have tried to move this forward before and it always just leads to a<br>&gt; huge explosion of ideas and feelings and just doesn't get anywhere.&nbsp;&nbsp;I am
<br>&gt; willing to be the guy to don the flame suit once again on this topic and try<br>&gt; to get this PEP written for strategy for renaming, reorganizing, and<br>&gt; deprecating modules.<br>&gt;<br>&gt; But I will probably need some general guidance from what you are looking for
<br>&gt; in terms of scope (e.g., if I remember correctly you don't want a 'py'<br>&gt; top-level namespace and you didn't like the idea of having like a 'net'<br>&gt; package, etc.) and depth (does the renaming extend to methods?).
<br><br>Well, what do you think of my pronouncement in response to Thomas's<br>mail (just rename a bunch of things that don't conform to our own<br>naming standard)? That should limit the discussion to what's the best<br>

name for StringIO etc.</blockquote><div><br>Sounds good.&nbsp; The only sticky point is whether we want to keep this dichotomy of C/Python implementations ala pickle and StringIO going.&nbsp; I personally would rather choose one (Python or C) and then work on getting the other to have the proper semantics.&nbsp; If we choose the C version we can stick the Python versions into lib-old or something so that if alternative Python implementations want to keep them alive and up-to-date they can for their own usage but the burden is taken off of us.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; I am definitely willing to commit to PEP 352 (new-style exceptions) and PEP
<br>&gt; 362 (signature PEP, but still needs a pronouncement).<br><br>I promise to look at that next.</blockquote><div><br>OK.&nbsp; I can also bug you at PyCon about it (assuming you are not doing a PEP parade this year) and spend my sprint time on these two PEPs.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; After that I am up
<br>&gt; for helping with the library re-org and probably with the type annotations<br>&gt; stuff.&nbsp;&nbsp;I am considering my import work as implementation-specific and thus<br><br>Did you mean implementation-independent?</blockquote>
<div><br>Yep.&nbsp; As in it could go into Py3K and/or Python 2.x. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt; can go in at almost any point (assuming backwards-compatibility issues are<br>&gt; not considered too horrible or performance is within reason) and thus not<br>&gt; necessarily time critical (unless you want to force it into Py3K to specify
<br>&gt; &quot;new&quot; semantics), in which case I would shift that up in priority.<br><br>I don't want new semantics for import, I just want the existing<br>semantics cleaned up and more easily tweaked through subclassing.
</blockquote><div><br>That's what I mean.&nbsp; I don't want to introduce new features, just maybe change stuff like saying that built-in modules are handles by a meta_path entry instead of monolithically by __import__ itself, etc.&nbsp; Maybe even changing its signature (don't know if globals and locals are really needed since you really only need __name__ and __path__ of the caller), etc.&nbsp; But that is a PEP topic and does not need to be worried about right now.
<br><br>-Brett</div></div>