Re: Python programming

2014-03-07 Thread Larry Hudson
I spotted a device on the table of the company calibration office... As I recall, it was a 100A capable resistor... 0.10 OHM. No idea what it was meant for; big binding posts at one end, and a slab of sheet steel in a "W" shape (smooth curves, not sharp bends). Exter

Re: why does "python --version" write to standard error?

2014-03-07 Thread Ned Deily
In article <20140307075744.ga43...@cskk.homeip.net>, Cameron Simpson wrote: > This seems to write the python version to standard error. That seems > very wrong. And at variance with the manual entry. Fixed in Python 3.4: http://bugs.python.org/issue18338 -- Ned Deily, n...@acm.org -- http

problem running python 3.3 on mac os mavericks

2014-03-07 Thread Romil Agrawal
I currently installed python 3.3.4 on mac os mavericks, and want to run it on Wing IDE. Previously it was running python 2.7.6. When I tried to change the python excitable in the wing ide configuration mode, and then restarted it, a dialog box was displayed that said the interpreter of python 3.3.4

Re: Tuples and immutability

2014-03-07 Thread Duncan Booth
Chris Angelico wrote: > On Sat, Mar 1, 2014 at 1:41 AM, Joshua Landau > wrote: >> Would it be better to add a check here, such that if this gets raised >> to the top-level it includes a warning ("Addition was inplace; >> variable probably mutated despite assignment failure")? > > That'd requir

Re: why does "python --version" write to standard error?

2014-03-07 Thread Cameron Simpson
On 07Mar2014 00:31, Ned Deily wrote: > In article <20140307075744.ga43...@cskk.homeip.net>, > Cameron Simpson wrote: > > This seems to write the python version to standard error. That seems > > very wrong. And at variance with the manual entry. > > Fixed in Python 3.4: > http://bugs.python.org/

Re: gdb unable to read python frame information

2014-03-07 Thread Wesley
Then, how to make python get debug symbols? Install python from source with some special configure options? -- https://mail.python.org/mailman/listinfo/python-list

Re: Tuples and immutability

2014-03-07 Thread Ben Finney
Duncan Booth writes: > Is there any reason why tuples need to throw an exception on assigning > to the element if the old value and new value are the same object? Special cases aren't special enough to break the rules. -- \ “I do not believe in forgiveness as it is preached by the |

Re: Tuples and immutability

2014-03-07 Thread Chris Angelico
On Fri, Mar 7, 2014 at 8:33 PM, Duncan Booth wrote: > Is there any reason why tuples need to throw an exception on assigning to > the element if the old value and new value are the same object? It'd be easy enough to implement your own tuple subclass that behaves that way. Try it! See how many si

Re: Assertions are bad, m'kay?

2014-03-07 Thread Steven D'Aprano
On Fri, 07 Mar 2014 18:16:55 +1100, Chris Angelico wrote: > They produce the wrong exception type, they disappear when you least > expect them, and now we have another reason not to use assert. > > http://xkcd.com/1339/ > > Abusing assert for arg checking violates XKCD 1339. Write > standards-co

Re: Assertions are bad, m'kay?

2014-03-07 Thread Chris Angelico
On Fri, Mar 7, 2014 at 10:11 PM, Steven D'Aprano wrote: >> http://xkcd.com/1339/ >> >> Abusing assert for arg checking violates XKCD 1339. Write >> standards-compliant code! > > Assertions are not bad! They're just misunderstood and abused. > > (By the way, assertions are not the same as assumptio

Re: Tuples and immutability

2014-03-07 Thread Peter Otten
Chris Angelico wrote: > On Fri, Mar 7, 2014 at 8:33 PM, Duncan Booth > wrote: >> Is there any reason why tuples need to throw an exception on assigning to >> the element if the old value and new value are the same object? > > It'd be easy enough to implement your own tuple subclass that behaves

Re: Tuples and immutability

2014-03-07 Thread Chris Angelico
On Fri, Mar 7, 2014 at 10:38 PM, Peter Otten <__pete...@web.de> wrote: > TypeError: 257 is not 257 > > I'm not sure "help" is the right word here ;) It doesn't help with non-small integers, yes, but the original case was a list. Personally, I don't think there are many situations that would benefi

Re: Tuples and immutability

2014-03-07 Thread Alister
On Fri, 07 Mar 2014 09:33:49 +, Duncan Booth wrote: > Chris Angelico wrote: > >> On Sat, Mar 1, 2014 at 1:41 AM, Joshua Landau wrote: >>> Would it be better to add a check here, such that if this gets raised >>> to the top-level it includes a warning ("Addition was inplace; >>> variable pro

GOLLY! HUMANS HAVE ORIGINS IN THE DEVONIAN!

2014-03-07 Thread thrinaxodon . of . use . net123
== >HOLY F*CKING GOD DAMNED NEWS! == > WELCOME TO YOUR NUMBER ONE SOURCE FOR PRESTIGIOUS BULLLSHIT! THE KIND YOU CAN ONLY GET FROM THRINAXODON CRAZY CHEESY! > NOW FOR YOUR FAVORITE TIME SLOT: > == > THRINAXODON FOUND 3 HUMAN FOSSILS

Re: gdb unable to read python frame information

2014-03-07 Thread Neal Becker
dieter wrote: > Wesley writes: > >> I wanna use gdb to attach my running python scripts. >> Successfully import libpython in gdb, but seems all py operations failed to >> read python information. >> >> Here is the snippet: >> (gdb) python >>>import libpython >>>end >> (gdb) py-bt >> #3 (unable t

debugging on windows

2014-03-07 Thread Robin Becker
Using Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:18:40) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. to run a tkinter + pmw2 application I have the following error on windows xp sp3 Unhandled exception at 0x1e0aebb8 in p

Re: Tuples and immutability

2014-03-07 Thread Roy Smith
In article , Duncan Booth wrote: > Is there any reason why tuples need to throw an exception on assigning to > the element if the old value and new value are the same object? > > If I say: > > a = ("spam", [10, 30], "eggs") > > then > > a[0] = a[0] > > won't actually mutate the obj

Re: Python programming

2014-03-07 Thread Grant Edwards
On 2014-03-07, William Ray Wing wrote: > On Mar 6, 2014, at 8:24 PM, Roy Smith wrote: >>> I spotted a device on the table of the company calibration office... >>> >>> As I recall, it was a 100A capable resistor... 0.10 OHM. >>> >>> No idea what it was meant for; big binding posts at one end, a

Re: Python programming

2014-03-07 Thread John Ladasky
On Thursday, February 13, 2014 12:30:39 AM UTC-8, larry@gmail.com wrote: > On Wed, Feb 12, 2014 at 10:56 PM, William Ray Wing wrote: > > > OK, and how many of you remember the original version of the > > tongue-in-cheek essay "Real Programmers Don't Use Pascal" from the back > > page of Dat

Is their a command to view code?

2014-03-07 Thread NexusRAwesome1995 .
I am making a text based aventure game for my assignment and a friends test run has somehow saved over the entire code file and now im using an earlier version of the code. I have 0 idea if there is anyway to look at the code using the IDLE and i need to do it to see how i fixed the fatal error lef

Re: Tuples and immutability

2014-03-07 Thread Ian Kelly
On Fri, Mar 7, 2014 at 4:51 AM, Alister wrote: > I would think it would be better if the exception was thrown before the > assignment to the list took place > simply seeing that a modification action was being applied to a tupple > should be enough. > this would alert the programmer to the fact th

Re: Python programming

2014-03-07 Thread Gene Heskett
On Friday 07 March 2014 12:29:38 Grant Edwards did opine: > On 2014-03-07, William Ray Wing wrote: > > On Mar 6, 2014, at 8:24 PM, Roy Smith wrote: > >>> I spotted a device on the table of the company calibration office... > >>> > >>> As I recall, it was a 100A capable resistor... 0.10 OHM. > >

Re: Is their a command to view code?

2014-03-07 Thread Ian Kelly
On Fri, Mar 7, 2014 at 10:55 AM, NexusRAwesome1995 . wrote: > I am making a text based aventure game for my assignment and a friends test > run has somehow saved over the entire code file and now im using an earlier > version of the code. I have 0 idea if there is anyway to look at the code > usin

Re: Is their a command to view code?

2014-03-07 Thread Joel Goldstick
On Mar 7, 2014 1:16 PM, "NexusRAwesome1995 ." wrote: > > I am making a text based aventure game for my assignment and a friends test run has somehow saved over the entire code file and now im using an earlier version of the code. I have 0 idea if there is anyway to look at the code using the IDLE

extract from json

2014-03-07 Thread teddybubu
I can't find any example on how to do this. I have a json file like so: {"bostock":[{"url":"http://bl.ocks.org/mbostock/9360565","title":"titleplaceholder","date":"dateplaceholder"}, {"url":"http://bl.ocks.org/mbostock/9265674","title":"titleplaceholder","date":"dateplaceholder"}, {"url":"http://bl

Re: gdb unable to read python frame information

2014-03-07 Thread Ned Deily
In article , Wesley wrote: > Then, how to make python get debug symbols? > > Install python from source with some special configure options? If your distribution doesn't have a debug version of Python and you need to build your own, add --with-pydebug to your ./configure options. See: ./con

Re: extract from json

2014-03-07 Thread Kev Dwyer
teddyb...@gmail.com wrote: > I can't find any example on how to do this. > I have a json file like so: > {"bostock": [{"url":"http://bl.ocks.org/mbostock/9360565","title":"titleplaceholder","date":"dateplaceholder"}, > {"url":"http://bl.ocks.org/mbostock/9265674","title":"titleplaceholder","date"

Re: Assertions are bad, m'kay?

2014-03-07 Thread Dan Stromberg
On Fri, Mar 7, 2014 at 3:11 AM, Steven D'Aprano wrote: > > Assertions are not bad! They're just misunderstood and abused. > You should read this guy's blog post on when to use assert: > > http://import-that.dreamwidth.org/676.html Nice article. BTW, what about: if value >= 3: raise Asserti

Re: Assertions are bad, m'kay?

2014-03-07 Thread Ben Finney
Dan Stromberg writes: > BTW, what about: > > if value >= 3: >raise AssertionError('value must be >= 3') That would be very confusing, since it would only appear when the value is >= 3. Were you making some other point? -- \“If this is your first visit to the USSR, you are welcome

Re: Assertions are bad, m'kay?

2014-03-07 Thread Irmen de Jong
On 8-3-2014 1:15, Dan Stromberg wrote: > On Fri, Mar 7, 2014 at 3:11 AM, Steven D'Aprano > wrote: > >> >> Assertions are not bad! They're just misunderstood and abused. > >> You should read this guy's blog post on when to use assert: >> >> http://import-that.dreamwidth.org/676.html > > Nice art

Re: Function and turtle help

2014-03-07 Thread Lee Harr
> I am completely new to programming so thanks for any help! Not sure it will help, and hopefully I am not self-promoting too much, but this may be of interest to you: http://pynguin.googlecode.com/ http://code.google.com/p/pynguin/wiki/StartProgramming I am interested in feedback from new pro

Re: Function and turtle help

2014-03-07 Thread Scott W Dunning
On Mar 7, 2014, at 6:16 PM, Lee Harr wrote: >> I am completely new to programming so thanks for any help! > > Not sure it will help, and hopefully I am not self-promoting too much, > but this may be of interest to you: > > http://pynguin.googlecode.com/ > > http://code.google.com/p/pynguin/wi

Re: Tuples and immutability

2014-03-07 Thread Gregory Ewing
Duncan Booth wrote: Is there any reason why tuples need to throw an exception on assigning to the element if the old value and new value are the same object? It would make introspection misleading, because tuples would have a __setitem__ method event though they don't actually support item assi

Re: extract from json

2014-03-07 Thread teddybubu
On Friday, March 7, 2014 3:05:15 PM UTC-6, Kev Dwyer wrote: > wrote: > > I can't find any example on how to do this. > > > I have a json file like so: > > > {"bostock":[{"url":"http://bl.ocks.org/mbostock/9360565","title":"titleplaceholder","date":"dateplaceholder"},{"url":"http://bl.ocks.org/mb

PYTHON BASTARDS STILL CAN'T ANSWER THIS QUESTION:

2014-03-07 Thread thrinaxodon666
== >HOLY F*CKING GOD DAMNED NEWS! == > WELCOME TO YOUR NUMBER ONE SOURCE FOR PRESTIGIOUS BULLLSHIT! THE KIND YOU CAN ONLY GET FROM THRINAXODON CRAZY CHEESY! > NOW FOR YOUR FAVORITE TIME SLOT: > == > THRINAXODON FOUND 3 HUMA

Re: extract from json

2014-03-07 Thread thrinaxodon666
On Friday, March 7, 2014 3:27:27 PM UTC-5, tedd...@gmail.com wrote: > I can't find any example on how to do this. > > I have a json file like so: > > {"bostock":[{"url":"http://bl.ocks.org/mbostock/9360565","title":"titleplaceholder","date":"dateplaceholder"}, > > {"url":"http://bl.ocks.org/mbos

Re: Python programming

2014-03-07 Thread William Ray Wing
On Mar 7, 2014, at 1:03 PM, John Ladasky wrote: > > As for FORTRAN? This week, I actually downloaded an application which > required a FORTRAN compiler. This is the only FORTRAN application I've ever > needed. It's not old code, the first revision came out about 10 years ago. > More than

Re: extract from json

2014-03-07 Thread Chris Angelico
On Sat, Mar 8, 2014 at 2:21 PM, wrote: > I think it's better if you (CENSORED) off. Teddybubu, please understand that the above comment is from a spammer and does not reflect the prevailing attitude of this list. I don't like to make content-free posts like this, but as you already have the answ

Re: Tuples and immutability

2014-03-07 Thread Ian Kelly
On Fri, Mar 7, 2014 at 7:17 PM, Gregory Ewing wrote: > Here's another idea: If the __iadd__ method returns the > same object, *and* the LHS doesn't have a __setitem__ > method, then do nothing instead of raising an exception. Maybe it doesn't have a __setitem__ because the object that was retriev

Re: gdb unable to read python frame information

2014-03-07 Thread dieter
Wesley writes: > Install python from source with some special configure options? When I last generated Python from source, there was no need to do anything special to get debugging symbols (the option ("gcc") option "-g" was automatically included). -- https://mail.python.org/mailman/listinfo/

Re: debugging on windows

2014-03-07 Thread dieter
Robin Becker writes: > Using > >> Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:18:40) [MSC v.1600 32 bit >> (Intel)] on win32 >> Type "help", "copyright", "credits" or "license" for more information. > > to run a tkinter + pmw2 application I have the following error on windows xp > sp3 >