Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-21 Thread Gregory Ewing
Chris Angelico wrote: With mypy, if your classes are too dynamic, you might have to create a stub file that's more static (but non-functional) just for the type checking. Can you do that if your type checker is part of the language? I think you may have misunderstood. I'm not suggesting that th

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-21 Thread Gregory Ewing
bartc wrote: In fact the declaration of A might be in a different module from its use in a type hint, which means that, in the CPython byte-code compiler anyway, it is not visible at compile-time, when type hints could best be put to good effect. The static type checker would have to understa

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-21 Thread oliver
Could something like this support forward declarations without the hackish use of strings? On Sun, 21 May 2017 at 12:01 justin walters wrote: > On Sun, May 21, 2017 at 2:38 AM, Chris Angelico wrote: > > > On Sun, May 21, 2017 at 7:29 PM, bartc wrote: > > > > > > They might be /created/ at runt

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-21 Thread justin walters
On Sun, May 21, 2017 at 2:38 AM, Chris Angelico wrote: > On Sun, May 21, 2017 at 7:29 PM, bartc wrote: > > > > They might be /created/ at runtime, but it's a pretty good bet that the > name > > A in this declaration: > > > > class A... > > > > is the name of a class. The question in Python, as

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-21 Thread Chris Angelico
On Sun, May 21, 2017 at 7:29 PM, bartc wrote: > > They might be /created/ at runtime, but it's a pretty good bet that the name > A in this declaration: > > class A... > > is the name of a class. The question in Python, as always, is whether an A > used as the name of a type in a type, is still t

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-21 Thread Chris Angelico
On Sun, May 21, 2017 at 7:15 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> How do you declare that a parameter must be an instance of some class? >> Classes are themselves created at run time. Or would your typing >> system require that all types be created in some declarable way? > > > T

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-21 Thread bartc
On 21/05/2017 06:41, Chris Angelico wrote: On Sun, May 21, 2017 at 3:30 PM, Gregory Ewing wrote: Chris Angelico wrote: But since Python _does_ work with dynamic evaluation (which consequently demands that these kinds of things be expressions evaluated at compile time), it must by definition b

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-21 Thread Gregory Ewing
Chris Angelico wrote: How do you declare that a parameter must be an instance of some class? Classes are themselves created at run time. Or would your typing system require that all types be created in some declarable way? Types that you want statically checked have to be described in a declara

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-20 Thread Chris Angelico
On Sun, May 21, 2017 at 3:30 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> But since Python _does_ work with dynamic evaluation >> (which consequently demands that these kinds of things be expressions >> evaluated at compile time), it must by definition be possible to have >> side effects

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-20 Thread Gregory Ewing
Chris Angelico wrote: But since Python _does_ work with dynamic evaluation (which consequently demands that these kinds of things be expressions evaluated at compile time), it must by definition be possible to have side effects. In most languages, type declarations are not expressions and aren'

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-20 Thread Steve D'Aprano
On Sun, 21 May 2017 12:14 am, Gregory Ewing wrote: > Steve D'Aprano wrote: >> You mean treat them as syntactically comments? >> >> def function(arg:I can put ***ANYTHING*** I like here!!!): > > They could be parsed as expressions and stored as an AST. > That would allow introspection, and you co

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-20 Thread Chris Angelico
On Sat, May 20, 2017 at 11:58 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> They're function metadata. What would the principle of least surprise >> say about this? >> >> print("Spam") >> def func(arg: print("Foo") = print("Quux")): >> print("Blargh") >> print("Fred") >> func() >> pri

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-20 Thread Gregory Ewing
Steve D'Aprano wrote: You mean treat them as syntactically comments? def function(arg:I can put ***ANYTHING*** I like here!!!): They could be parsed as expressions and stored as an AST. That would allow introspection, and you could evaluate them if you wanted Ever since they were introduced,

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-20 Thread Gregory Ewing
Chris Angelico wrote: They're function metadata. What would the principle of least surprise say about this? print("Spam") def func(arg: print("Foo") = print("Quux")): print("Blargh") print("Fred") func() print("Eggs") Most languages that have static type declarations wouldn't let you write

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-20 Thread Steve D'Aprano
On Sat, 20 May 2017 11:57 am, Chris Angelico wrote: > They're function metadata. What would the principle of least surprise > say about this? > > print("Spam") > def func(arg: print("Foo") = print("Quux")): > print("Blargh") > print("Fred") > func() > print("Eggs") > > What should be printed

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-20 Thread Steve D'Aprano
On Sat, 20 May 2017 11:42 am, Gregory Ewing wrote: > Steve D'Aprano wrote: >> On Fri, 19 May 2017 11:35 pm, Edward Ned Harvey (python) wrote: >> >>> I *thought* python 3.0 to 3.4 would *ignore* annotations, but it >>> doesn't... >> >> Wh

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Dan Stromberg
On Fri, May 19, 2017 at 6:35 AM, Edward Ned Harvey (python) wrote: > I think it's great that for built-in types such as int and str, backward > compatibility of type hinting annotations is baked into python 3.0 to 3.4. In > fact, I *thought* python 3.0 to 3.4 would *ignore* annot

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread oliver
h the reason that the interpreter evaluates in this order :) On Fri, 19 May 2017 at 21:59 Chris Angelico wrote: > On Sat, May 20, 2017 at 11:42 AM, Gregory Ewing > wrote: > > Steve D'Aprano wrote: > >> > >> On Fri, 19 May 2017 11:35 pm, Edward Ned Harvey (python)

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Chris Angelico
On Sat, May 20, 2017 at 11:42 AM, Gregory Ewing wrote: > Steve D'Aprano wrote: >> >> On Fri, 19 May 2017 11:35 pm, Edward Ned Harvey (python) wrote: >> >>> I *thought* python 3.0 to 3.4 would *ignore* annotations, but it >>> doesn't... >>

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Gregory Ewing
Steve D'Aprano wrote: On Fri, 19 May 2017 11:35 pm, Edward Ned Harvey (python) wrote: I *thought* python 3.0 to 3.4 would *ignore* annotations, but it doesn't... Why would you think that? Ever since Guido retconned the purpose of annotations to be for static type hinting *only*

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Steve D'Aprano
On Fri, 19 May 2017 11:35 pm, Edward Ned Harvey (python) wrote: > I think it's great that for built-in types such as int and str, backward > compatibility of type hinting annotations is baked into python 3.0 to 3.4. > In fact, I *thought* python 3.0 to 3.4 would *ignore* annot

RE: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Edward Ned Harvey (python)
This pattern seems to work: import sys if sys.version_info[0] < 3: raise RuntimeError("Must use at least python version 3") # The 'typing' module, useful for type hints, was introduced in python 3.5 if sys.version_info[1] >= 5: from typing import Optional optional_float = Optional[fl

Re: type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Peter Otten
Edward Ned Harvey (python) wrote: > I think it's great that for built-in types such as int and str, backward > compatibility of type hinting annotations is baked into python 3.0 to 3.4. > In fact, I *thought* python 3.0 to 3.4 would *ignore* annotations, but it > doesn't...

type hinting backward compatibility with python 3.0 to 3.4

2017-05-19 Thread Edward Ned Harvey (python)
I think it's great that for built-in types such as int and str, backward compatibility of type hinting annotations is baked into python 3.0 to 3.4. In fact, I *thought* python 3.0 to 3.4 would *ignore* annotations, but it doesn't... I'm struggling to create something backward

Re: Re: Pyitect - Plugin architectural system for Python 3.0+ (feedback?)

2015-07-16 Thread ryexander
On Monday, June 22, 2015 at 1:18:08 PM UTC-6, Ian wrote: > On Mon, Jun 22, 2015 at 2:32 AM, Ben Powers wrote: > > on Tue, Jun 16, 2015 at 17:49 Ian Kelly wrote > > > >>On Mon, Jun 8, 2015 at 10:42 PM, Ben Powers wrote: > >>> #file.py > >>> from PyitectConsumes import foo > >>> > >>> class Bar(o

Re: Re: Pyitect - Plugin architectural system for Python 3.0+ (feedback?)

2015-06-22 Thread Ian Kelly
On Mon, Jun 22, 2015 at 2:32 AM, Ben Powers wrote: > on Tue, Jun 16, 2015 at 17:49 Ian Kelly wrote > >>On Mon, Jun 8, 2015 at 10:42 PM, Ben Powers wrote: >>> #file.py >>> from PyitectConsumes import foo >>> >>> class Bar(object): >>> def __init__(): >>> foo("it's a good day to be a

Re: Re: Pyitect - Plugin architectural system for Python 3.0+ (feedback?)

2015-06-22 Thread Ben Powers
on Tue, Jun 16, 2015 at 17:49 Ian Kelly wrote >On Mon, Jun 8, 2015 at 10:42 PM, Ben Powers wrote: >> As importlib has been added in python 3 and up I decided to use it's >> abilities to create a plugin system for truly modular development in python. >> >> Pyitect has the ability to drop in comp

Re: Pyitect - Plugin architectural system for Python 3.0+ (feedback?)

2015-06-16 Thread Ian Kelly
On Mon, Jun 8, 2015 at 10:42 PM, Ben Powers wrote: > As importlib has been added in python 3 and up I decided to use it's > abilities to create a plugin system for truly modular development in python. > > Pyitect has the ability to drop in components and resolve dependencies. Even > load different

Pyitect - Plugin architectural system for Python 3.0+ (feedback?)

2015-06-08 Thread Ben Powers
As importlib has been added in python 3 and up I decided to use it's abilities to create a plugin system for truly modular development in python. Pyitect has the ability to drop in components and resolve dependencies. Even load different versions of a dependency if two different libraries require

Re: Why Python 4.0 won't be like Python 3.0

2014-08-19 Thread Steven D'Aprano
Grant Edwards wrote: > I do > remember delaying moving from 1.5.2 -> 2.0 until I really had to, but > I don't remember why. I remember delaying moving from 1.5 until 2.3, but I remember why. Three reasons: (1) People are often like cats, and like cats, they are either curious and inquisitive abo

Re: Why Python 4.0 won't be like Python 3.0

2014-08-19 Thread Johann Hibschman
Skip Montanaro writes: > On Tue, Aug 19, 2014 at 9:27 AM, Grant Edwards > wrote: >> I'm probably conflating the 1.5.2/2.0 and the 2.6 stuff. I do >> remember delaying moving from 1.5.2 -> 2.0 until I really had to, but >> I don't remember why. > > If you were a RedHat user during that timefram

Re: Why Python 4.0 won't be like Python 3.0

2014-08-19 Thread Grant Edwards
On 2014-08-19, Skip Montanaro wrote: > On Tue, Aug 19, 2014 at 9:27 AM, Grant Edwards > wrote: >> I'm probably conflating the 1.5.2/2.0 and the 2.6 stuff. I do >> remember delaying moving from 1.5.2 -> 2.0 until I really had to, but >> I don't remember why. > > If you were a RedHat user during

Re: Why Python 4.0 won't be like Python 3.0

2014-08-19 Thread Skip Montanaro
On Tue, Aug 19, 2014 at 9:27 AM, Grant Edwards wrote: > I'm probably conflating the 1.5.2/2.0 and the 2.6 stuff. I do > remember delaying moving from 1.5.2 -> 2.0 until I really had to, but > I don't remember why. If you were a RedHat user during that timeframe, that might have contributed to yo

Re: Why Python 4.0 won't be like Python 3.0

2014-08-19 Thread Grant Edwards
On 2014-08-19, Steven D'Aprano wrote: > Grant Edwards wrote: > >> On 2014-08-18, Ethan Furman wrote: >>> On 08/18/2014 07:51 AM, Grant Edwards wrote: To all of us out here in user-land a change in the first value in the version tuple means breakage and incompatibilities. And when t

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Steven D'Aprano
Ben Finney wrote: > Grant Edwards writes: > >> I agree with the comments that the appellation for "simply the next >> version after 3.9" should be 3.10 and not 4.0. Everybody I know >> considers SW versions numbers to be dot-separated tuples, not floating >> point numbers. > > This consensus is

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Tim Delaney
On 19 August 2014 00:51, Grant Edwards wrote: > On 2014-08-17, Mark Lawrence wrote: > > A blog from Nick Coghlan > > http://www.curiousefficiency.org/posts/2014/08/python-4000.html that > > should help put a few minds to rest. > > I agree with the comments that the appellation for "simply the ne

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Chris Angelico
On Tue, Aug 19, 2014 at 10:05 AM, Steven D'Aprano wrote: > I consider versions to be *strings*. They include non-numeric components > such as "a", "b", "rc", so they aren't numbers. They're certainly not > floating point numbers, since they have a variable number of decimal > points. Although ther

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Steven D'Aprano
Grant Edwards wrote: > On 2014-08-18, Ethan Furman wrote: >> On 08/18/2014 07:51 AM, Grant Edwards wrote: >>> >>> To all of us out here in user-land a change in the first value in the >>> version tuple means breakage and incompatibilities. And when the >>> second value is "0", you avoid it until

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Steven D'Aprano
Grant Edwards wrote: > On 2014-08-17, Mark Lawrence wrote: >> A blog from Nick Coghlan >> http://www.curiousefficiency.org/posts/2014/08/python-4000.html that >> should help put a few minds to rest. > > I agree with the comments that the appellation for "simply the next > version after 3.9" shou

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Chris Angelico
On Tue, Aug 19, 2014 at 3:00 AM, ElChino wrote: > Or lets make the version asymptotically grow towards 4. > Any sensible function for that? Easy! We just keep on adding parts. 3.7, 3.8, 3.9, 3.9.9, 3.9.9.9, 3.9.9.9.9, 3.9.9.9.9.9... ChrisA -- https://mail.python.org/mailman/listinfo/python-lis

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Ben Finney
Grant Edwards writes: > I agree with the comments that the appellation for "simply the next > version after 3.9" should be 3.10 and not 4.0. Everybody I know > considers SW versions numbers to be dot-separated tuples, not floating > point numbers. This consensus is sometimes termed “semantic ver

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Emile van Sebille
On 8/18/2014 2:09 PM, Grant Edwards wrote: On 2014-08-18, Ethan Furman wrote: On 08/18/2014 07:51 AM, Grant Edwards wrote: To all of us out here in user-land a change in the first value in the version tuple means breakage and incompatibilities. And when the second value is "0", you avoid it u

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Grant Edwards
On 2014-08-18, Ethan Furman wrote: > On 08/18/2014 07:51 AM, Grant Edwards wrote: >> >> To all of us out here in user-land a change in the first value in the >> version tuple means breakage and incompatibilities. And when the >> second value is "0", you avoid it until some other sucker has found >

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Ethan Furman
On 08/18/2014 10:00 AM, ElChino wrote: "Grant Edwards" wrote: To all of us out here in user-land a change in the first value in the version tuple means breakage and incompatibilities. And when the second value is "0", you avoid it until some other sucker has found the bugs and a few more minor

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Ethan Furman
On 08/18/2014 07:51 AM, Grant Edwards wrote: To all of us out here in user-land a change in the first value in the version tuple means breakage and incompatibilities. And when the second value is "0", you avoid it until some other sucker has found the bugs and a few more minor releases have come

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread ElChino
"Grant Edwards" wrote: To all of us out here in user-land a change in the first value in the version tuple means breakage and incompatibilities. And when the second value is "0", you avoid it until some other sucker has found the bugs and a few more minor releases have come out. "Three shall

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Chris Angelico
On Tue, Aug 19, 2014 at 12:51 AM, Grant Edwards wrote: > I agree with the comments that the appellation for "simply the next > version after 3.9" should be 3.10 and not 4.0. Everybody I know > considers SW versions numbers to be dot-separated tuples, not > floating point numbers. > Agreed. Howev

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Grant Edwards
On 2014-08-17, Mark Lawrence wrote: > A blog from Nick Coghlan > http://www.curiousefficiency.org/posts/2014/08/python-4000.html that > should help put a few minds to rest. I agree with the comments that the appellation for "simply the next version after 3.9" should be 3.10 and not 4.0. Everyb

Re: Why Python 4.0 won't be like Python 3.0

2014-08-17 Thread Chris Angelico
On Mon, Aug 18, 2014 at 9:17 AM, Redge @ Versalytics.com wrote: > Definitely a relief. After delving into Python only a few short months ago, > everything I was reading suggested 2.x.x. When I switched to another book to > continue with my studies, some of the code wasn't working ... welcome to

Re: Why Python 4.0 won't be like Python 3.0

2014-08-17 Thread Redge @ Versalytics.com
> On Aug 17, 2014, at 8:37 AM, Mark Lawrence wrote: > > A blog from Nick Coghlan > http://www.curiousefficiency.org/posts/2014/08/python-4000.html that should > help put a few minds to rest. > > -- > My fellow Pythonistas, ask not what our language can do for you, ask > what you can do for o

Why Python 4.0 won't be like Python 3.0

2014-08-17 Thread Mark Lawrence
A blog from Nick Coghlan http://www.curiousefficiency.org/posts/2014/08/python-4000.html that should help put a few minds to rest. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinf

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-14 Thread D'Arcy J.M. Cain
On Fri, 11 Mar 2011 06:30:35 -0800 Westley Martínez wrote: [repeated posing elided] > n00m: GET A BLOG. Is it so hard to simply add him to your killfile and move on? Those of us who have already done so get to see his postings anyway if people are going to reply and repeat his trolls. -- D'Ar

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-11 Thread Dan Stromberg
On Thu, Mar 10, 2011 at 11:59 PM, n00m wrote: > Fitzgerald had been an alcoholic since his college days, and became > notorious during the 1920s for his extraordinarily heavy drinking, > leaving him in poor health by the late 1930s. According to Zelda's > biographer, Nancy Milford, Scott claimed

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-11 Thread Nobody
On Thu, 10 Mar 2011 17:58:50 -0800, n00m wrote: > http://docs.python.org/py3k/whatsnew/3.0.html > > What's the fuss abt it? Imo all is ***OK*** with 3k (in the parts I > understand). Some of use Python 2.x as a general-purpose Unix scripting language. For that purpose, Python 3.x's obsession wit

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-11 Thread Westley Martínez
On Thu, 2011-03-10 at 17:58 -0800, n00m wrote: > http://docs.python.org/py3k/whatsnew/3.0.html > > What's the fuss abt it? Imo all is ***OK*** with 3k (in the parts I > understand). > I even liked print as a function **more** than print as a stmt > > Now I think that Py3k is better than all prev

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-11 Thread n00m
Fitzgerald had been an alcoholic since his college days, and became notorious during the 1920s for his extraordinarily heavy drinking, leaving him in poor health by the late 1930s. According to Zelda's biographer, Nancy Milford, Scott claimed that he had contracted tuberculosis, but Milford dismiss

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-10 Thread n00m
On Mar 11, 8:35 am, Grigory Javadyan wrote: > > Moreover I'm often able to keep in mind 2 (or more) opposite ideas or > > opinions of mine. > > """ > To know and not to know, to be conscious of complete truthfulness > while telling carefully constructed lies, to hold simultaneously two > opinions

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-10 Thread Grigory Javadyan
> Moreover I'm often able to keep in mind 2 (or more) opposite ideas or > opinions of mine. > """ To know and not to know, to be conscious of complete truthfulness while telling carefully constructed lies, to hold simultaneously two opinions which cancelled out, knowing them to be contradictory an

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-10 Thread Dan Stromberg
On Thu, Mar 10, 2011 at 6:05 PM, alex23 wrote: > On Mar 11, 11:58 am, n00m wrote: > > http://docs.python.org/py3k/whatsnew/3.0.html > > > > What's the fuss abt it? Imo all is ***OK*** with 3k (in the parts I > > understand). > > I even liked print as a function **more** than print as a stmt > >

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-10 Thread n00m
ore** than print as a stmt > > > Now I think that Py3k is better than all prev pythons and cobras. > > I agree ;-). Now read What's New for 3.1 and 3.2 and load and use 3.2 > with numberous fixes and improvements to doc and code. 3.3 will be > better yet. > > -- >

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-10 Thread Terry Reedy
On 3/10/2011 8:58 PM, n00m wrote: http://docs.python.org/py3k/whatsnew/3.0.html What's the fuss abt it? Imo all is ***OK*** with 3k (in the parts I understand). I even liked print as a function **more** than print as a stmt Now I think that Py3k is better than all prev pythons and cobras. I a

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-10 Thread n00m
On Mar 11, 4:05 am, alex23 wrote: > On Mar 11, 11:58 am, n00m wrote: > > >http://docs.python.org/py3k/whatsnew/3.0.html > > > What's the fuss abt it? Imo all is ***OK*** with 3k (in the parts I > > understand). > > I even liked print as a function **more** than print as a stmt > > > Now I think t

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-10 Thread MRAB
On 11/03/2011 02:05, alex23 wrote: On Mar 11, 11:58 am, n00m wrote: http://docs.python.org/py3k/whatsnew/3.0.html What's the fuss abt it? Imo all is ***OK*** with 3k (in the parts I understand). I even liked print as a function **more** than print as a stmt Now I think that Py3k is better tha

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-10 Thread alex23
On Mar 11, 11:58 am, n00m wrote: > http://docs.python.org/py3k/whatsnew/3.0.html > > What's the fuss abt it? Imo all is ***OK*** with 3k (in the parts I > understand). > I even liked print as a function **more** than print as a stmt > > Now I think that Py3k is better than all prev pythons and cob

Just finished reading of "What’s New In Python 3.0"

2011-03-10 Thread n00m
http://docs.python.org/py3k/whatsnew/3.0.html What's the fuss abt it? Imo all is ***OK*** with 3k (in the parts I understand). I even liked print as a function **more** than print as a stmt Now I think that Py3k is better than all prev pythons and cobras. -- http://mail.python.org/mailman/listi

Re: weakref.proxy behaviour in python 3.0

2010-08-21 Thread Mark Dickinson
On Aug 21, 5:06 pm, Nicholas Cole wrote: > On Sat, Aug 21, 2010 at 3:31 PM, Mark Dickinson wrote: > > [SNIP] > > > So my guess is that the change was unintentional. > > > It's probably worth a bug report.  Even if the behaviour isn't going > > to change in either 2.x or 3.x (and it probably isn't

Re: weakref.proxy behaviour in python 3.0

2010-08-21 Thread Nicholas Cole
On Sat, Aug 21, 2010 at 3:31 PM, Mark Dickinson wrote: [SNIP] > So my guess is that the change was unintentional. > > It's probably worth a bug report.  Even if the behaviour isn't going > to change in either 2.x or 3.x (and it probably isn't), it might be > possible to clarify the docs. Dear M

Re: weakref.proxy behaviour in python 3.0

2010-08-21 Thread Mark Dickinson
On Aug 21, 1:13 pm, Nicholas Cole wrote: > I've searched for information on this without success.  Has > weakref.proxy changed in Python 3?  I couldn't see any note in the > documentation, but the following code behaves differently on Python > 2.6.1 and Python 3: > > import weakref > class Test(ob

weakref.proxy behaviour in python 3.0

2010-08-21 Thread Nicholas Cole
Dear List, I've searched for information on this without success. Has weakref.proxy changed in Python 3? I couldn't see any note in the documentation, but the following code behaves differently on Python 2.6.1 and Python 3: import weakref class Test(object): pass realobject = Test() pobject =

Re: 2to3 issues with execfile on python 3.0 on files with encoding

2010-05-06 Thread Martin v. Loewis
> The default replacement should be really providing a new execfile that > gets the encoding in the first 2 lines and opens it with the proper > encoding set (and properly closes the stream). No. The default replacement should really open the file in binary mode. Regards, Martin -- http://mail.p

2to3 issues with execfile on python 3.0 on files with encoding

2010-05-06 Thread Fabio Zadrozny
Right now, it seems that the default implementation of execfile in 2to3 is something as: exec(compile(open(file).read()+"\n", file, 'exec'), globals, locals) But it seems it won't deal with encodings properly... and also, in CPython just making an open without a close is OK, because of the refere

Re: Python 3.0 usage?

2010-02-18 Thread Philip Semanchuk
On Feb 18, 2010, at 12:20 AM, alex23 wrote: MRAB wrote: Python 3.0 had a relatively short run before it was superseded by Python 3.1 due to certain issues, so, IMHO, I wouldn't worry about it unless someone especially requests/requires it. And even then, I'd just tell the

Re: Python 3.0 usage?

2010-02-17 Thread alex23
MRAB wrote: > Python 3.0 had a relatively short run before it was superseded by Python > 3.1 due to certain issues, so, IMHO, I wouldn't worry about it unless > someone especially requests/requires it. And even then, I'd just tell them I accept patches :) -- http://mail

Re: Python 3.0 usage?

2010-02-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Philip Semanchuk wrote: > is Python 3.0 seeing use in production > anywhere, or did most of the Python world move to 3.1 as soon as it was > released? Python 3.0 has been end of lifed: http://www.python.org/download/releases/3.0.1/ Con

Re: Python 3.0 usage?

2010-02-17 Thread MRAB
Philip Semanchuk wrote: Hi all, I'm the author of an extension (posix_ipc) that works under Python 2.4 - 2.6. I have a version that works under Python 2.4-2.6 and 3.1 and I would like to release it, but it doesn't work under Python 3.0. I could hack up Python 3.0-specific workaround

Python 3.0 usage?

2010-02-17 Thread Philip Semanchuk
Hi all, I'm the author of an extension (posix_ipc) that works under Python 2.4 - 2.6. I have a version that works under Python 2.4-2.6 and 3.1 and I would like to release it, but it doesn't work under Python 3.0. I could hack up Python 3.0-specific workarounds, but I'm not su

Hi, SOAP lib for Python 3.0

2009-09-22 Thread Ares
Hi, Does anyone have a reccommendation on the best soap library for Python 3.0? The libs I found only support python 2.6 or belove. Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 (pinin' for the fjords)

2009-07-03 Thread Terry Reedy
Alan G Isaac wrote: Using the 3.1 Windows installer, I chose that I did not want the extensions registered, and the installer unregistered the .py and .pyw extensions (which I had wanted to keep associated with Python 2.6). Is this intentional? I suspect not, but Martin is the one to answer. I

Re: Python 3.0 (pinin' for the fjords)

2009-07-02 Thread Alan G Isaac
Using the 3.1 Windows installer, I chose that I did not want the extensions registered, and the installer unregistered the .py and .pyw extensions (which I had wanted to keep associated with Python 2.6). Is this intentional? Alan Isaac PS I already fixed the problem. My question is about intent

Python 3.0 (pinin' for the fjords)

2009-07-02 Thread Barry Warsaw
Now that Python 3.1 is out, it seems there's been some confusion as to whether there will be one last Python 3.0 release, i.e. Python 3.0.2. At the PyCon 2009 language summit it was decided that there will be *no* Python 3.0.2. Python 3.0 is different than all other releases. There

Re: Suppressing Implicit Chained Exceptions (Python 3.0)

2009-07-02 Thread andrew cooke
David Bolen wrote: > "andrew cooke" writes: > >> However, when printed via format_exc(), this new exception still has the old exception attached via the mechanism described at >> http://www.python.org/dev/peps/pep-3134/ (this is Python 3.0). > > If you're

Re: Suppressing Implicit Chained Exceptions (Python 3.0)

2009-07-02 Thread David Bolen
"andrew cooke" writes: > However, when printed via format_exc(), this new exception still has the > old exception attached via the mechanism described at > http://www.python.org/dev/peps/pep-3134/ (this is Python 3.0). If you're in control of the format_exc() call, I thi

Suppressing Implicit Chained Exceptions (Python 3.0)

2009-07-01 Thread andrew cooke
mechanism described at http://www.python.org/dev/peps/pep-3134/ (this is Python 3.0). Is there any simple way to stop this? It's rather annoying and misleading, as it exposes a lot of internal detail that the caller does not understand or want. This is marked as an "open issue&q

Re: os.walk and os.listdir problems python 3.0+

2009-06-27 Thread Gabriel Genellina
En Thu, 25 Jun 2009 11:15:15 -0300, Amos Anderson escribió: Thank you. That works very well when writing to a text file but what is the equivalent when writing the information to stdout using print? See this recent post: http://comments.gmane.org/gmane.comp.python.general/627850 -- Gabri

Re: os.walk and os.listdir problems python 3.0+

2009-06-25 Thread Amos Anderson
"Amos Anderson" wrote in message > news:a073a9cf0906242007k5067314dn8e9d7b1c6da62...@mail.gmail.com... > > I've run into a bit of an issue iterating through files in python 3.0 and >> 3.1rc2. When it comes to a files with '\u200b' in the file name it give

Re: os.walk and os.listdir problems python 3.0+

2009-06-24 Thread Mark Tolonen
"Amos Anderson" wrote in message news:a073a9cf0906242007k5067314dn8e9d7b1c6da62...@mail.gmail.com... I've run into a bit of an issue iterating through files in python 3.0 and 3.1rc2. When it comes to a files with '\u200b' in the file name it gives the error... Tr

os.walk and os.listdir problems python 3.0+

2009-06-24 Thread Amos Anderson
I've run into a bit of an issue iterating through files in python 3.0 and 3.1rc2. When it comes to a files with '\u200b' in the file name it gives the error... Traceback (most recent call last): File "ListFiles.py", line 19, in f.write("file:{0}\n".

Re: Missing codecs in Python 3.0

2009-06-03 Thread Benjamin Peterson
samwyse gmail.com> writes: > > I have a Python 2.6 program (a code generator, actually) that tries > several methods of compressing a string and chooses the most compact. > It then writes out something like this: > { encoding='bz2_codec', data = '...'} In 3.x, all codecs which don't directly

Re: Missing codecs in Python 3.0

2009-06-02 Thread Martin v. Löwis
samwyse wrote: > I have a Python 2.6 program (a code generator, actually) that tries > several methods of compressing a string and chooses the most compact. > It then writes out something like this: > { encoding='bz2_codec', data = '...'} > > I'm having two problems converting this to Py3. Firs

Re: Missing codecs in Python 3.0

2009-06-02 Thread Carl Banks
rt 2.6 doc page. > You can always use the `bz2` module instead. Or write your own > encoder/decoder for bz2 and register it with the `codecs` module. IIRC, they decided the codecs would only be used for bytes<->unicode encodings in Python 3.0 (which was their intended use all along),

Re: Missing codecs in Python 3.0

2009-06-02 Thread Chris Rebert
On Tue, Jun 2, 2009 at 7:15 PM, samwyse wrote: > I have a Python 2.6 program (a code generator, actually) that tries > several methods of compressing a string and chooses the most compact. > It then writes out something like this: >  { encoding='bz2_codec', data = '...'} > > I'm having two problem

Missing codecs in Python 3.0

2009-06-02 Thread samwyse
I have a Python 2.6 program (a code generator, actually) that tries several methods of compressing a string and chooses the most compact. It then writes out something like this: { encoding='bz2_codec', data = '...'} I'm having two problems converting this to Py3. First is the absence of the bz2

Re: python 2.6 packages in python 3.0

2009-06-02 Thread Terry Reedy
Chris Rebert wrote: On Tue, Jun 2, 2009 at 12:51 AM, ssd wrote: Hi, I usually works with packages like pyserial, numpy, mathplotlib,pyUSB, etc.. When is planned that these packages are supported in Python 3.0? That would depend on the individual packages and their maintainers. Check their

Re: python 2.6 packages in python 3.0

2009-06-02 Thread Chris Rebert
On Tue, Jun 2, 2009 at 12:51 AM, ssd wrote: > Hi, > > I usually works with packages like pyserial, numpy, mathplotlib,pyUSB, etc.. > > When is planned that these packages are supported in Python 3.0? That would depend on the individual packages and their maintainers. Check t

python 2.6 packages in python 3.0

2009-06-02 Thread ssd
Hi, I usually works with packages like pyserial, numpy, mathplotlib,pyUSB, etc.. When is planned that these packages are supported in Python 3.0? Seen this i would say that is not recommendable to use Python 3.0 at the moment? most of 2.6 packages are not available, not working in python 3.0

Re: Install Python 3.0 dmg to macos 10.5

2009-05-06 Thread Diez B. Roggisch
silverburgh wrote: > Hi, > > If I install python 3.0 dmg, will it wipe out the existing python > installation on macos 10.5 (i don't know how the original python was > installed ( i think it is version 2.5). No. The original is under /System/Library/Frameworks/Python.fram

Install Python 3.0 dmg to macos 10.5

2009-05-05 Thread silverburgh
Hi, If I install python 3.0 dmg, will it wipe out the existing python installation on macos 10.5 (i don't know how the original python was installed ( i think it is version 2.5). Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: urlgrabber for Python 3.0

2009-04-30 Thread Terry Reedy
Robert Dailey wrote: urlgrabber 3.1.0 currently does not support Python 3.0. URLs are nice. I presume you mean the package at http://linux.duke.edu/projects/urlgrabber/ Development appears to have stopped over two years ago with the 3.1.0 release, which was for 2.3-2.5. > Is ther

urlgrabber for Python 3.0

2009-04-30 Thread Robert Dailey
urlgrabber 3.1.0 currently does not support Python 3.0. Is there a version out there that does support this? Perhaps Python 3.0 now has built in support for this? Could someone provide some guidance here? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: telnetlib in python-3.0

2009-04-29 Thread Jack Diederich
On Wed, Apr 29, 2009 at 11:31 PM, wrote: > Is anyone using telnetlib in python-3.0? If so are you having any > success? Using the example at the bottom of the telnetlib doc page I > cannot seem to get any joy at all. I can make a connection, but write > (command) seems to do nothi

  1   2   3   4   5   6   7   8   9   10   >