Re: Hello World

2014-12-22 Thread Rustom Mody
On Monday, December 22, 2014 3:04:52 PM UTC+5:30, Marko Rauhamaa wrote: > Steven D'Aprano : > > > Steve Hayes wrote: > >> But what if I had run it and it reformatted my hard disk? > >> > >> How would I have known that it would or wouldn't do that? > > > > That's why I didn't run it myself :-) >

Re: what is wrong with d.clear()?

2014-12-22 Thread Dave Angel
On 12/22/2014 09:33 PM, Steven D'Aprano wrote: Dave Angel wrote: Or even better: Don't use html email for forum messages. It frequently messes up the colors, the font, the formatting (like indentation), or even prevents some people from even seeing and/or replying to the message. Put the ema

Re: Hello World

2014-12-22 Thread Mark Lawrence
On 23/12/2014 01:39, Chris Angelico wrote: On Tue, Dec 23, 2014 at 12:37 PM, MRAB wrote: And a programming newsgroup isn't really the plaice for it anyway! And yet we do carp on a bit, don't we... ChrisA Gordon Bennett what have I started? You dangle a bit of bait and... -- My fellow Py

Re: what is wrong with d.clear()?

2014-12-22 Thread Steven D'Aprano
Dave Angel wrote: > Or even better:  Don't use html email for forum messages.  It frequently > messes up the colors, the font, the formatting (like indentation), or > even prevents some people from even seeing and/or replying to the > message.  Put the email program in text mode, and just send wha

Re: what is wrong with d.clear()?

2014-12-22 Thread Steven D'Aprano
sohcahto...@gmail.com wrote: > Is there a reason you're composing your messages with a large, colored > font? How do you know what font the OP is using to compose his text? I see his post in the font of my choosing, which for the record is "DejaVu LGC Sans Mono 10", in black, on a white backgro

OFF TOPIC Snow Crash [was Re: Hello World]

2014-12-22 Thread Steven D'Aprano
Chris Angelico wrote: > On Tue, Dec 23, 2014 at 12:15 AM, Roy Smith wrote: >> If I really didn't trust something, I'd go to AWS and spin up one of >> their free-tier micro instances and run it there :-) > > How do you know it won't create console output that stroboscopically > infects you with a

Re: Hello World

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 12:37 PM, MRAB wrote: > And a programming newsgroup isn't really the plaice for it anyway! And yet we do carp on a bit, don't we... ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Hello World

2014-12-22 Thread MRAB
On 2014-12-23 01:03, sohcahto...@gmail.com wrote: On Monday, December 22, 2014 4:56:13 PM UTC-8, Roy Smith wrote: In article , Tim Chase wrote: > On 2014-12-22 19:05, MRAB wrote: > > On 2014-12-22 18:51, Mark Lawrence wrote: > > > I'm having wonderful thoughts of Michael Palin's favourite Pyt

Re: Hello World

2014-12-22 Thread sohcahtoa82
On Monday, December 22, 2014 4:56:13 PM UTC-8, Roy Smith wrote: > In article , > Tim Chase wrote: > > > On 2014-12-22 19:05, MRAB wrote: > > > On 2014-12-22 18:51, Mark Lawrence wrote: > > > > I'm having wonderful thoughts of Michael Palin's favourite Python > > > > sketch which involved fish sl

Re: Hello World

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 11:55 AM, Roy Smith wrote: > In article , > Tim Chase wrote: > >> On 2014-12-22 19:05, MRAB wrote: >> > On 2014-12-22 18:51, Mark Lawrence wrote: >> > > I'm having wonderful thoughts of Michael Palin's favourite Python >> > > sketch which involved fish slapping. >> > > >>

Re: Hello World

2014-12-22 Thread Roy Smith
In article , Tim Chase wrote: > On 2014-12-22 19:05, MRAB wrote: > > On 2014-12-22 18:51, Mark Lawrence wrote: > > > I'm having wonderful thoughts of Michael Palin's favourite Python > > > sketch which involved fish slapping. > > > > > Well, ChrisA _has_ mentioned Pike in this thread. :-) > > B

Re: Program calling unwanted functions

2014-12-22 Thread Ian Kelly
On Dec 22, 2014 6:06 PM, wrote: > > Huh...there actually is a limit of about 1,000. I'm assuming this is hard-coded? I did a similar test with Java a while back and was getting different results every time. The default is 1000 but it can be configured with sys.setrecursionlimit. I think Java on

Re: Program calling unwanted functions

2014-12-22 Thread sohcahtoa82
On Monday, December 22, 2014 3:57:31 PM UTC-8, Dave Angel wrote: > On 12/22/2014 06:48 PM, Ian Kelly wrote: > > On Dec 22, 2014 2:37 PM, "Dave Angel" wrote: > >> > >> I'll pick on one function first, called instructions(). If the user > > types something invalid, you print "Invalid input." and ca

Re: Program calling unwanted functions

2014-12-22 Thread Dave Angel
On 12/22/2014 06:48 PM, Ian Kelly wrote: On Dec 22, 2014 2:37 PM, "Dave Angel" wrote: I'll pick on one function first, called instructions(). If the user types something invalid, you print "Invalid input." and call the function again. In this case, because the call is at the end, no harm is

Re: Program calling unwanted functions

2014-12-22 Thread Ian Kelly
On Dec 22, 2014 2:37 PM, "Dave Angel" wrote: > > I'll pick on one function first, called instructions(). If the user types something invalid, you print "Invalid input." and call the function again. In this case, because the call is at the end, no harm is usually done, but it would be tricky to e

Re: TypeError: unhashable type: 'list'

2014-12-22 Thread Dave Angel
On 12/22/2014 06:10 PM, ronald.kevin.bur...@gmail.com wrote: I am getting an exception that the traceback looks like: Traceback (most recent call last): File "C:\Projects\QA\robot_20141103\resources\assessment_utilities.py", line 2

Re: TypeError: unhashable type: 'list'

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 10:10 AM, wrote: > My problem is that I am not sure what the problem is. I can check the type of > 'self' which is an object and the string 'Furnace Whistle' is obviously not a > list. The static function 'MeasureMaker.Code2Measure' is a simple factory: > > class Measure

Re: Encryption - was Hello World

2014-12-22 Thread Dave Angel
On 12/22/2014 05:29 PM, Chris Angelico wrote: On Tue, Dec 23, 2014 at 6:57 AM, Dave Angel wrote: I figure I must be misunderstanding something in your explanation, since a brute-force password guesser would seem to only need four billion tries to (probably) crack that. As to the assump

TypeError: unhashable type: 'list'

2014-12-22 Thread ronald . kevin . burton
I am getting an exception that the traceback looks like: Traceback (most recent call last): File "C:\Projects\QA\robot_20141103\resources\assessment_utilities.py", line 29, in create_new_project program = customer.add(program_code

Re: very weird pandas behavior

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 9:15 AM, Rick Johnson wrote: > I mean, if you were dumping it because of it's > shameless herd-conformity to the Unicode standard then AT > LEAST that would make sense me! Wait, which of our trolls are you? ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Encryption - was Hello World

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 6:57 AM, Dave Angel wrote: > I figure I must be misunderstanding something in your explanation, since a > brute-force password guesser would seem to only need four billion tries to > (probably) crack that. > > 1) Are you assuming that the cracker can read the source code, b

Re: very weird pandas behavior

2014-12-22 Thread Rick Johnson
On Monday, December 22, 2014 9:56:11 AM UTC-6, ryguy7272 wrote: I've been using Python for quite a few years now an i can only once remember using any type of "python installation tools" (easy_install or pip... puke!). I've always found the easiest route to be just downloading a zip/tar file, and

Re: what is wrong with d.clear()?

2014-12-22 Thread Dave Angel
On 12/22/2014 04:19 PM, sohcahto...@gmail.com wrote: On Monday, December 22, 2014 12:54:55 PM UTC-8, Rick Johnson wrote: On Monday, December 22, 2014 12:16:03 PM UTC-6, sohca...@gmail.com wrote: On Monday, December 22, 2014 12:16:15 AM UTC-8, shawool wrote: [snip: OP's adolescent accessorizing

Re: what is wrong with d.clear()?

2014-12-22 Thread sohcahtoa82
On Monday, December 22, 2014 12:54:55 PM UTC-8, Rick Johnson wrote: > On Monday, December 22, 2014 12:16:03 PM UTC-6, sohca...@gmail.com wrote: > > On Monday, December 22, 2014 12:16:15 AM UTC-8, shawool wrote: > > > > [snip: OP's adolescent accessorizing] @_@ > > > > Is there a reason you're com

Re: what is wrong with d.clear()?

2014-12-22 Thread Rick Johnson
On Monday, December 22, 2014 12:16:03 PM UTC-6, sohca...@gmail.com wrote: > On Monday, December 22, 2014 12:16:15 AM UTC-8, shawool wrote: > > [snip: OP's adolescent accessorizing] @_@ > > Is there a reason you're composing your messages with a > large, colored font Shit's obnoxious, yo. Whilst

Re: Program calling unwanted functions

2014-12-22 Thread Dave Angel
On 12/22/2014 02:55 PM, Luke Tomaneng wrote: Hello to all those in this forum, Hello. When starting a thread, please tell us your environment. In this case, it would be the python version and OS. My code seems to have a mind of its own. I have been writing a program to reenact the "

Re: List Comprehensions

2014-12-22 Thread Terry Reedy
On 12/22/2014 12:10 PM, Chris Angelico wrote: On Tue, Dec 23, 2014 at 2:18 AM, Steven D'Aprano wrote: Chris Angelico wrote: On Mon, Dec 22, 2014 at 8:21 PM, Steven D'Aprano wrote: If the called function has side-effects, a list comp is not a good solution. Hmm. I'm not so sure about that.

Re: Program calling unwanted functions

2014-12-22 Thread John Gordon
In Luke Tomaneng writes: > The "cameraman" function restarts itself when it ends, and the "kid" > function calls "instructions()." Does anyone know why? The cameraman function restarts itself because ... that's what you told it to do. As far as I can see, every possible logic branch ends up w

Program calling unwanted functions

2014-12-22 Thread Luke Tomaneng
Hello to all those in this forum, My code seems to have a mind of its own. I have been writing a program to reenact the "Twenny Wun" Vine video, and it seems to be activating functions without me calling them. Here is the script: def kid(): print "Cameraman: You stupid." kid1 = raw_

Encryption - was Hello World

2014-12-22 Thread Dave Angel
On 12/22/2014 12:25 PM, Chris Angelico wrote: There's one exception. Writing your own crypto is a bad idea if that means reimplementing AES... but if you want something that's effective on completely different levels, sometimes it's best to write your own. I had a project a while ago that needed

Re: Hello World

2014-12-22 Thread Tim Chase
On 2014-12-22 19:05, MRAB wrote: > On 2014-12-22 18:51, Mark Lawrence wrote: > > I'm having wonderful thoughts of Michael Palin's favourite Python > > sketch which involved fish slapping. > > > Well, ChrisA _has_ mentioned Pike in this thread. :-) But you know he does it just for the halibut... -

Re: Hello World

2014-12-22 Thread alister
On Mon, 22 Dec 2014 16:18:33 +, Grant Edwards wrote: > On 2014-12-21, Tony the Tiger wrote: >> On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: >> >>> I am in total awe. >> >> I'm not. It has no real value. Write your code like that and you'll >> soon be looking for a new job. > >

Re: Hello World

2014-12-22 Thread MRAB
On 2014-12-22 18:51, Mark Lawrence wrote: On 22/12/2014 16:23, Grant Edwards wrote: On 2014-12-21, Roy Smith wrote: In article <54974ed7$0$12986$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: Obviously you don't write obfuscated code like this for production use, except in su

Re: Hello World

2014-12-22 Thread Mark Lawrence
On 22/12/2014 16:23, Grant Edwards wrote: On 2014-12-21, Roy Smith wrote: In article <54974ed7$0$12986$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: Obviously you don't write obfuscated code like this for production use, except in such cases where you deliberately want to wri

Re: Hello World

2014-12-22 Thread Mark Lawrence
On 22/12/2014 15:39, Skip Montanaro wrote: On Mon, Dec 22, 2014 at 9:22 AM, Steven D'Aprano mailto:steve%2bcomp.lang.pyt...@pearwood.info>> wrote: > Don't try this at home! > > > # download_naked_pictures_of_jennifer_lawrence.py > import os > os.system("rm ――rf /") And because Steven *kno

Re: what is wrong with d.clear()?

2014-12-22 Thread sohcahtoa82
On Monday, December 22, 2014 12:16:15 AM UTC-8, shawool wrote: > Hi, > > where am i going wrong ? > > $ python3 > Python 3.2.5 (default, Oct  2 2013, 22:58:11) > [GCC 4.8.1] on cygwin > Type "help", "copyright", "credits" or "license" for more information. > >>> d = {} > >>> import sys > >>> d =

Re: List Comprehensions

2014-12-22 Thread Rustom Mody
On Monday, December 22, 2014 8:37:50 PM UTC+5:30, Chris Angelico wrote: > On Tue, Dec 23, 2014 at 1:58 AM, Rustom Mody wrote: > > If you consider side-effecting comprehensions as kosher, > > then a next conclusion is naturally going to be that > > multiple generator comprehensions are confusing and

Re: very weird pandas behavior

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 3:47 AM, Dave Angel wrote: > (I lied. I kept Windows, in a Virtualbox, so I can resurrect it on demand) You remind me of the evil sorcerers who keep their defeated foes around in undead form, so they can torment them whenever they feel like it. Only difference is, resurre

Re: Hello World

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 3:23 AM, Grant Edwards wrote: >> Heh. I once worked on a C++ project that included its own crypo code >> (i.e. custom implementations of things like AES and SHA-1). > > Damn. Should I ever start to do something like that (for a real > product), I hereby officially request

Re: List Comprehensions

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 2:18 AM, Steven D'Aprano wrote: > Chris Angelico wrote: > >> On Mon, Dec 22, 2014 at 8:21 PM, Steven D'Aprano >> wrote: >>> If the called function has side-effects, a list comp is not a good >>> solution. >> >> Hmm. I'm not so sure about that. Side effects are fine in a li

Re: Hello World

2014-12-22 Thread Steven D'Aprano
Skip Montanaro wrote: > On Mon, Dec 22, 2014 at 9:22 AM, Steven D'Aprano < > steve+comp.lang.pyt...@pearwood.info> wrote: >> Don't try this at home! >> >> >> # download_naked_pictures_of_jennifer_lawrence.py >> import os >> os.system("rm ――rf /") > > And because Steven *knows* some fool will "try

Re: very weird pandas behavior

2014-12-22 Thread Dave Angel
On 12/22/2014 10:55 AM, ryguy7272 wrote: I just uninstalled Python and deleted 15 Python books that I found online. AH! I feel great That's the way i felt when I uninstalled Windows. It's better not to not have something installed that you won't run. Likewise

Re: very weird pandas behavior

2014-12-22 Thread Mark Lawrence
On 22/12/2014 15:55, ryguy7272 wrote: On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: "pip install pandas" It looks like everything downloaded and installed fine. Great. Now, in Pytho

Re: List Comprehensions

2014-12-22 Thread Mark Lawrence
On 22/12/2014 05:42, Ganesh Pal wrote: Hi , (a) I was trying to reduce the below piece of code using List comprehension ? Any suggestion please let me know for opt in options: opt['result'] = Queue.Queue() tmp_thread = pause.Thread(opt) threads.append(tmp

Re: Hello World

2014-12-22 Thread Grant Edwards
On 2014-12-22, Steve Hayes wrote: > On Mon, 22 Dec 2014 09:51:02 +1100, Steven > D'Aprano> wrote: > >>Obviously you don't write obfuscated code like this for production >>use, except in such cases where you deliberately want to write >>obfuscated code for production use. > > Yes, my initial react

Re: Hello World

2014-12-22 Thread Grant Edwards
On 2014-12-21, Roy Smith wrote: > In article <54974ed7$0$12986$c3e8da3$54964...@news.astraweb.com>, > Steven D'Aprano wrote: > >> Obviously you don't write obfuscated code like this for production use, >> except in such cases where you deliberately want to write obfuscated code >> for production

Re: Hello World

2014-12-22 Thread Grant Edwards
On 2014-12-21, Tony the Tiger wrote: > On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: > >> I am in total awe. > > I'm not. It has no real value. Write your code like that and you'll soon > be looking for a new job. I think you'll find that people who know enough to write code like th

Re: Hello World

2014-12-22 Thread Chris Warrick
On Mon, Dec 22, 2014 at 4:36 PM, Jussi Piitulainen wrote: > Steven D'Aprano writes: > >> Don't try this at home! >> >> # download_naked_pictures_of_jennifer_lawrence.py >> import os >> os.system("rm ――rf /") > > Not sure what that character is (those characters are) but it's not > (they aren't) th

Re: very weird pandas behavior

2014-12-22 Thread ryguy7272
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: > I downloaded pandas and put it in my python directory, then, at the C-prompt, > I ran this: > "pip install pandas" > > It looks like everything downloaded and installed fine. Great. > > Now, in Python Shell, I enter this: > im

Re: Hello World

2014-12-22 Thread Skip Montanaro
On Mon, Dec 22, 2014 at 9:22 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > Don't try this at home! > > > # download_naked_pictures_of_jennifer_lawrence.py > import os > os.system("rm ――rf /") And because Steven *knows* some fool will "try this at home", he cripples the rm co

Re: Hello World

2014-12-22 Thread Jussi Piitulainen
Steven D'Aprano writes: > Don't try this at home! > > # download_naked_pictures_of_jennifer_lawrence.py > import os > os.system("rm ――rf /") Not sure what that character is (those characters are) but it's not (they aren't) the hyphen that rm expects in its options, so: >>> os.system("rm ――rf

Re: Hello World

2014-12-22 Thread Steven D'Aprano
Roy Smith wrote: > If I wanted to write something evil, I wouldn't write it to > look obfuscated.  I'd write it to look like it did something useful. That's an order of magnitude harder than merely obfuscating code. If you wanted to write something evil, better to just rely on the fact that most

Re: List Comprehensions

2014-12-22 Thread Steven D'Aprano
Chris Angelico wrote: > On Mon, Dec 22, 2014 at 8:21 PM, Steven D'Aprano > wrote: >> If the called function has side-effects, a list comp is not a good >> solution. > > Hmm. I'm not so sure about that. Side effects are fine in a list comp, > as long as you're making use of the return values. For

Re: List Comprehensions

2014-12-22 Thread Ian Kelly
On Mon, Dec 22, 2014 at 2:21 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > > (b) * Is there anything that I need to consider while using list > > comprehension with threads ?* > > That depends on what you mean by "using list comprehension with threads". > > If you mean "use

Re: List Comprehensions

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 1:58 AM, Rustom Mody wrote: > If you consider side-effecting comprehensions as kosher, > then a next conclusion is naturally going to be that > multiple generator comprehensions are confusing and therefore > not kosher -- a very unfortunate conclusion IMHO. Why does that f

Re: List Comprehensions

2014-12-22 Thread Rustom Mody
On Monday, December 22, 2014 6:52:12 PM UTC+5:30, Chris Angelico wrote: > On Tue, Dec 23, 2014 at 12:07 AM, Roy Smith wrote: > > def init_thread(opt): > >opt['result'] = Queue.Queue() > >thread = pause.Thread(opt) > >thread.start() > >return thread > > > > threads = [init_thread(opt

Re: Hello World

2014-12-22 Thread Roy Smith
In article <87egrrrf2i@elektro.pacujo.net>, Marko Rauhamaa wrote: > Roy Smith : > > > If I really didn't trust something, I'd go to AWS and spin up one of > > their free-tier micro instances and run it there :-) > > Speaking of trust and AWS, Amazon admins—and by extension, the NSA—hav

Re: Hello World

2014-12-22 Thread Marko Rauhamaa
Roy Smith : > If I really didn't trust something, I'd go to AWS and spin up one of > their free-tier micro instances and run it there :-) Speaking of trust and AWS, Amazon admins—and by extension, the NSA—have full access to the virtual machines. That needs to be taken into account when running s

Re: Hello World

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 12:15 AM, Roy Smith wrote: > If I really didn't trust something, I'd go to AWS and spin up one of > their free-tier micro instances and run it there :-) How do you know it won't create console output that stroboscopically infects you with a virus through your eyes? Because

Re: List Comprehensions

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 12:07 AM, Roy Smith wrote: > def init_thread(opt): >opt['result'] = Queue.Queue() >thread = pause.Thread(opt) >thread.start() >return thread > > threads = [init_thread(opt) for opt in options] If this is, indeed, just initializing the threads, then this mig

Re: Hello World

2014-12-22 Thread Roy Smith
In article <5497e1d5$0$12978$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > Steve Hayes wrote: > > > Yes, my initial reaction was "that's awesome". > > > > And my second thought was that it was scary. > > > > I ran it. It worked, and printed "Hello world". I was awed. > > > >

Re: Hello World

2014-12-22 Thread Roy Smith
In article <0udf9a1m3n02rt06a5ib58mvifm7sde...@4ax.com>, Steve Hayes wrote: > On Mon, 22 Dec 2014 09:51:02 +1100, Steven D'Aprano > wrote: > > >Tony the Tiger wrote: > > > >> On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: > >> > >>> I am in total awe. > >> > >> I'm not. It has no

Re: List Comprehensions

2014-12-22 Thread Roy Smith
In article , Chris Angelico wrote: > On Mon, Dec 22, 2014 at 4:42 PM, Ganesh Pal wrote: > > (a) I was trying to reduce the below piece of code using List comprehension > > ? Any suggestion please let me know > > > > > > for opt in options: > > opt['result'] = Queue.Queue() > >

Re: what is wrong with d.clear()?

2014-12-22 Thread Ned Batchelder
On 12/21/14 2:28 AM, shawool wrote: Hi, where am i going wrong ? $ python3 Python 3.2.5 (default, Oct 2 2013, 22:58:11) [GCC 4.8.1] on cygwin Type "help", "copyright", "credits" or "license" for more information. d = {} import sys d = sys.modules This does not make a copy of sys.modules. T

Re: List Comprehensions

2014-12-22 Thread Chris Angelico
On Mon, Dec 22, 2014 at 8:21 PM, Steven D'Aprano wrote: > If the called function has side-effects, a list comp is not a good solution. Hmm. I'm not so sure about that. Side effects are fine in a list comp, as long as you're making use of the return values. For instance, if you have a function tha

Re: Hello World

2014-12-22 Thread Marko Rauhamaa
Steven D'Aprano : > Steve Hayes wrote: >> But what if I had run it and it reformatted my hard disk? >> >> How would I have known that it would or wouldn't do that? > > That's why I didn't run it myself :-) Well, I admit having run yum install python3 as root. > Ultimately, I'm trusting the

Re: List Comprehensions

2014-12-22 Thread Steven D'Aprano
Ganesh Pal wrote: > Hi , > > > (a) I was trying to reduce the below piece of code using List > comprehension ? Any suggestion please let me know > > > for opt in options: > opt['result'] = Queue.Queue() > tmp_thread = pause.Thread(opt) > threads.append(tmp_t

Re: Hello World

2014-12-22 Thread Steven D'Aprano
Steve Hayes wrote: > Yes, my initial reaction was "that's awesome". > > And my second thought was that it was scary. > > I ran it. It worked, and printed "Hello world". I was awed. > > But what if I had run it and it reformatted my hard disk? > > How would I have known that it would or wouldn'

Re: Hello World

2014-12-22 Thread Chris Angelico
On Mon, Dec 22, 2014 at 7:52 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> Level 0: Why implement your own crypto?!? > > Licensing concerns come to mind. > > For example, the reference implementations of MD5 [RFC1321] and SHA1 > [RFC3174] are not in the public domain. Which would you prefer?

Re: what is wrong with d.clear()?

2014-12-22 Thread Terry Reedy
On 12/21/2014 2:28 AM, shawool wrote: where am i going wrong ? You clear sys.modules, which apparently CPython uses in its normal function. Python 3.2.5 (default, Oct 2 2013, 22:58:11) d = {} import sys d = sys.modules type(d) dir(d) ['__class__', '__contains__', '__delattr__', '__de

Re: Hello World

2014-12-22 Thread Marko Rauhamaa
Chris Angelico : > Level 0: Why implement your own crypto?!? Licensing concerns come to mind. For example, the reference implementations of MD5 [RFC1321] and SHA1 [RFC3174] are not in the public domain. Marko -- https://mail.python.org/mailman/listinfo/python-list

what is wrong with d.clear()?

2014-12-22 Thread shawool
Hi, where am i going wrong ? $ python3 Python 3.2.5 (default, Oct 2 2013, 22:58:11) [GCC 4.8.1] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> d = {} >>> import sys >>> d = sys.modules >>> type(d) >>> dir(d) ['__class__', '__contains__', '__delattr__', '__d