Re: A few questiosn about encoding

2013-06-19 Thread Steven D'Aprano
On Wed, 19 Jun 2013 18:46:59 -0700, Rick Johnson wrote: > On Thursday, June 13, 2013 2:11:08 AM UTC-5, Steven D'Aprano wrote: > >> Gah! That's twice I've screwed that up. Sorry about that! > > Yeah, and your difficulty explaining the Unicode implementation reminds > me of a passage from the Pyt

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-19 Thread Michael Torrie
On 06/19/2013 11:48 PM, Steven D'Aprano wrote: > On Wed, 19 Jun 2013 23:16:51 -0600, Michael Torrie wrote: > >> The real power and expressivity of Python comes from embracing the >> abstractions that Python provides to your advantage. There's a certain >> elegance and beauty that comes from such

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-19 Thread Steven D'Aprano
On Wed, 19 Jun 2013 23:16:51 -0600, Michael Torrie wrote: > The real power and expressivity of Python comes from embracing the > abstractions that Python provides to your advantage. There's a certain > elegance and beauty that comes from such things, which I believe really > comes from the elegan

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-19 Thread Michael Torrie
On 06/19/2013 11:16 PM, Michael Torrie wrote: > It turns out that lists, hashes (dicts), and classes can pretty much > do anything with having to much about with C-style pointers and > such. Oh wow. Parse error. should read, "pretty much do anything without having to muck about with C-style point

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-19 Thread Michael Torrie
On 06/18/2013 03:51 AM, Νίκος wrote: > Στις 18/6/2013 12:05 μμ, ο/η Steven D'Aprano έγραψε: >> Names are *always* linked to objects, not to other names. >> >> a = [] >> b = a # Now a and b refer to the same list >> a = {} # Now a refers to a dict, and b refers to the same list as before > > I see

Re: About GIL Questions!

2013-06-19 Thread Chris Angelico
On Thu, Jun 20, 2013 at 2:13 PM, Thanatos xiao wrote: > Hey everyone! > Recently I see the python source code, but i still not understand about gil. > first, why single core quicker multi-core ? who can explan this in bottom > layery ? > second, what the different between the mult-core and the si

About GIL Questions!

2013-06-19 Thread Thanatos xiao
Hey everyone! Recently I see the python source code, but i still not understand about gil. first, why single core quicker multi-core ? who can explan this in bottom layery ? second, what the different between the mult-core and the single core to schecule threads? thanks! Forgive me bad english! -

Re: Popen in Python3

2013-06-19 Thread Nobody
On Wed, 19 Jun 2013 23:03:05 +, Joseph L. Casale wrote: > I am trying to invoke a binary that requires dll's in two places all of > which are included in the path env variable in windows. When running this > binary with popen it can not find either, passing env=os.environ to open > made no dif

Re: Problem with the "for" loop syntax

2013-06-19 Thread Cameron Simpson
On 20Jun2013 11:09, Chris Angelico wrote: | On Thu, Jun 20, 2013 at 11:02 AM, Arturo B wrote: | > Fixed, the problem was in | > HANGMANPICS | > | > I didn't open the brackets. | > Thank you guys :) | | General debugging tip: Syntax errors are sometimes discovered quite | some way below the actua

Re: python game

2013-06-19 Thread Jackson Kemp
Thankyou this was very helpful -- http://mail.python.org/mailman/listinfo/python-list

Re: A few questiosn about encoding

2013-06-19 Thread Rick Johnson
On Thursday, June 13, 2013 2:11:08 AM UTC-5, Steven D'Aprano wrote: > Gah! That's twice I've screwed that up. > Sorry about that! Yeah, and your difficulty explaining the Unicode implementation reminds me of a passage from the Python zen: "If the implementation is hard to explain, it's a bad

Re: Default Value

2013-06-19 Thread Steven D'Aprano
On Wed, 19 Jun 2013 12:17:35 -0700, Ahmed Abdulshafy wrote: > I'm reading the Python.org tutorial right now, and I found this part > rather strange and incomprehensible to me> > > Important warning: The default value is evaluated only once. This makes > a difference when the default is a mutable

Re: Problem with the "for" loop syntax

2013-06-19 Thread Chris Angelico
On Thu, Jun 20, 2013 at 11:02 AM, Arturo B wrote: > Fixed, the problem was in > HANGMANPICS > > I didn't open the brackets. > > Thank you guys :) General debugging tip: Syntax errors are sometimes discovered quite some way below the actual cause. The easiest way to figure out what's the real caus

Re: Problem with the "for" loop syntax

2013-06-19 Thread Arturo B
Fixed, the problem was in HANGMANPICS I didn't open the brackets. Thank you guys :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't feed the troll...

2013-06-19 Thread Steven D'Aprano
On Wed, 19 Jun 2013 12:40:15 -0600, Ian Kelly wrote: > On the other hand, the flamers responding to the trolls are regular > contributers to the list who presumably do care about keeping the list > courteous, respectful, welcoming and enjoyable to participate in. > Toward that end, I do not think

Re: Problem with the "for" loop syntax

2013-06-19 Thread Arturo B
Sorry, I'm new in here So, if you want to see the complete code I've fixed it: http://www.smipple.net/snippet/a7xrturo/Hangman%21%20%3A%29 And here is the part of code that doesn't work: #The error is marked in the whitespace between letter and in def displayBoard(HANGMANPICS, missedLetters,

Re: Problem with the "for" loop syntax

2013-06-19 Thread Joshua Landau
On 19 June 2013 23:53, Arturo B wrote: > Mmmm > > Ok guys, thank you > > I'm really sure that isn't a weird character, it is a space. > > My Python version is 3.3.2, I've runed this code in Python 2.7.5, but it > stills the same. > > I've done what you said but it doesn't work. > > Please Che

Re: python game

2013-06-19 Thread Joshua Landau
This is prob'ly the freakiest thing I've ever run... Anyhoo, I recommend that when you post slabs of code to a mailing list you at least make it runnable for us. We don't have the images. I "fixed" it by doing: | playerImage = pygame.Surface((40, 40)) | bearImage = pygame.Surface((64, 64)) | | pla

Popen in Python3

2013-06-19 Thread Joseph L. Casale
I am trying to invoke a binary that requires dll's in two places all of which are included in the path env variable in windows. When running this binary with popen it can not find either, passing env=os.environ to open made no difference. Anyone know what might cause this or how to work around thi

Re: Problem with the "for" loop syntax

2013-06-19 Thread Arturo B
Mmmm Ok guys, thank you I'm really sure that isn't a weird character, it is a space. My Python version is 3.3.2, I've runed this code in Python 2.7.5, but it stills the same. I've done what you said but it doesn't work. Please Check it again here is better explained: http://snipplr.com/v

Re: Problem with the "for" loop syntax

2013-06-19 Thread Ian Kelly
On Wed, Jun 19, 2013 at 3:14 PM, arturo balbuena wrote: > Hello guys... > I´m a begginer in Python, I'm doing a Hangman game, but I'm having trouble > with this blank space. I would be greatful if you help me. :) > > Here's my code: > > http://snipplr.com/view/71581/hangman/ > > When I run the co

Re: Problem with the "for" loop syntax

2013-06-19 Thread John Gordon
In <18f427ef-7a9a-413d-a824-65c9df430...@googlegroups.com> arturo balbuena writes: > Hello guys... > I=B4m a begginer in Python, I'm doing a Hangman game, but I'm having troubl= > e with this blank space. I would be greatful if you help me. :) > Here's my code: > http://snipplr.com/view/71581/

Re: Problem with the "for" loop syntax

2013-06-19 Thread Dave Angel
On 06/19/2013 05:14 PM, arturo balbuena wrote: Hello guys... I´m a begginer in Python, I'm doing a Hangman game, but I'm having trouble with this blank space. I would be greatful if you help me. :) Here's my code: http://snipplr.com/view/71581/hangman/ When I run the code it says: Invalid Syn

Problem with the "for" loop syntax

2013-06-19 Thread arturo balbuena
Hello guys... I´m a begginer in Python, I'm doing a Hangman game, but I'm having trouble with this blank space. I would be greatful if you help me. :) Here's my code: http://snipplr.com/view/71581/hangman/ When I run the code it says: Invalid Syntax and this is the error: http://i.imgur.com/jK

Re: Don't feed the troll...

2013-06-19 Thread rurpy
On 06/19/2013 04:57 AM, Antoon Pardon wrote: > Op 19-06-13 05:46, ru...@yahoo.com schreef: >> On 06/18/2013 02:22 AM, Antoon Pardon wrote: >>> Op 17-06-13 19:56, ru...@yahoo.com schreef: >> I was using the photodetector/light system as a emotion-free >> analog of the troll/troll-feeders positive f

Re: python game

2013-06-19 Thread Denis McMahon
On Wed, 19 Jun 2013 13:18:49 -0700, jacksonkemp1234 wrote: > if moveDown and player.right < WINDOW_WIDTH: > player.right += MOVE_SPEED Should this be moveRight instead of moveDown? -- Denis McMahon, denismfmcma...@gmail.com -- http://mail.python.org/mailman/listinfo/python-

Re: python game

2013-06-19 Thread Denis McMahon
On Wed, 19 Jun 2013 13:18:49 -0700, jacksonkemp1234 wrote: > windowSurface.blit(playerImage, player) > for bear in bears: > windowSurface.blit(bearImage, bear) Try changing this to draw the bears first, then the player. -- Denis McMahon, denismfmcma...@gmail.com --

Re: Newbie: The philosophy behind list indexes

2013-06-19 Thread ian . l . cameron
Thanks everyone for taking the time to offer some very insightful replies. Learning a new language is so much more fun with a group of friendly and helpful people around! -- http://mail.python.org/mailman/listinfo/python-list

python game

2013-06-19 Thread jacksonkemp1234
I made this game where you move a player over bears, but the bears keep loading over the plaeyer making it hard to see it, also when i move down the player goes down to the right here is my code: import pygame, sys, random from pygame.locals import * from threading import Timer #set up pygame

Re: Default Value

2013-06-19 Thread Gary Herron
On 06/19/2013 12:17 PM, Ahmed Abdulshafy wrote: I'm reading the Python.org tutorial right now, and I found this part rather strange and incomprehensible to me> Important warning: The default value is evaluated only once. This makes a difference when the default is a mutable object such as a li

Re: Why is regex so slow?

2013-06-19 Thread Roy Smith
On Wednesday, June 19, 2013 9:21:43 AM UTC-4, Duncan Booth wrote: > I'd just like to point out that your simple loop is looking at every > character of the input string. The simple "'ENQ' not in line" test can look > at the third character of the string and if it's none of 'E', 'N' or 'Q' > ski

Re: Default Value

2013-06-19 Thread Rick Johnson
On Wednesday, June 19, 2013 2:17:35 PM UTC-5, Ahmed Abdulshafy wrote: > I'm reading the Python.org tutorial right now, and I found > this part rather strange and incomprehensible to me> > > Important warning: The default value is evaluated only > once. This makes a difference when the default is a

Re: Default Value

2013-06-19 Thread Jussi Piitulainen
Ahmed Abdulshafy writes: > I'm reading the Python.org tutorial right now, and I found this part > rather strange and incomprehensible to me > > Important warning: The default value is evaluated only once. This > makes a difference when the default is a mutable object such as a > list, dictionary

Re: A Beginner's Doubt

2013-06-19 Thread Rick Johnson
On Wednesday, June 19, 2013 12:57:06 PM UTC-5, Terry Reedy wrote: > > Terry (speaking to OP) said: > > Do you literally mean a full screen *window*, like a > browser maximized,

Default Value

2013-06-19 Thread Ahmed Abdulshafy
I'm reading the Python.org tutorial right now, and I found this part rather strange and incomprehensible to me> Important warning: The default value is evaluated only once. This makes a difference when the default is a mutable object such as a list, dictionary, or instances of most classes def

Re: Don't feed the troll...

2013-06-19 Thread Ian Kelly
On Wed, Jun 19, 2013 at 4:57 AM, Antoon Pardon wrote: > I don't remember making such a claim. What I do remember is > you among others claiming that the problem was not (so much) > the troll (Nikos) but the others. Count me among those who feel this way. > And your last conclusion is unsound. Yo

Re: A Beginner's Doubt

2013-06-19 Thread Joshua Landau
On 19 June 2013 17:39, Joel Goldstick wrote: > What is the subject that this teacher of yours teaches? > Do you know anyone who has every done any programming? > Why python? One of those questions is too easy :P. But, no, I'd actually point out that Python might *not* be the best language for th

Re: Timsort in Cpython

2013-06-19 Thread Ian Kelly
On Wed, Jun 19, 2013 at 11:18 AM, wrote: > The second argument takes the tuple which determines which varialble(key) to > use the comparator on. And the third determines whether to return the list in > ascending or descending order. That's not exactly correct. The arguments are listed in that

Re: A Beginner's Doubt

2013-06-19 Thread Terry Reedy
On 6/19/2013 9:58 AM, augusto...@gmail.com wrote: Hello! This is my first post in this group and the reason why I came across here is that, despite my complete lack of knowledge in the programming area, I received an order from my teacher to develop a visually interactive program, until 20th J

Re: A Beginner's Doubt

2013-06-19 Thread rusi
On Jun 19, 9:53 pm, Joshua Landau wrote: > Please be aware, Augusto, that Rick is known to be a bit... OTT. Don't > take him too seriously (but he's not an idiot either). > > On 19 June 2013 14:58,   wrote: > > > Hello! > > This is my first post in this group and the reason why I came across here

Re: Timsort in Cpython

2013-06-19 Thread sean . westfall
On Sunday, June 16, 2013 1:33:17 PM UTC-7, Ian wrote: > On Sat, Jun 15, 2013 at 10:05 PM, wrote: > > > Yes I've read it. Very interesting read. There are other resources too > > online that make it very clear, for instance the wikipedia articles is > > pretty good. > > > > > > Though, if any

Re: Writing Extensions for Python 3 in C

2013-06-19 Thread rusi
On Jun 18, 3:24 pm, Aditya Avinash wrote: > Hi. This is the last place where I want to ask a question. I have searched > for lots of tutorials and documentation on the web but, didn't find a > decent one to develop extensions for Python 3 using a custom compiler > (mingw32, nvcc). Please help me.

Re: Timsort in Cpython

2013-06-19 Thread sean . westfall
On Sunday, June 16, 2013 1:16:02 PM UTC-7, Dennis Lee Bieber wrote: > On Sun, 16 Jun 2013 09:15:11 -0700 (PDT), alphons...@gmail.com declaimed > > the following: > > > > >sorry about that. I'm new to google groups. I'm trying to make sense of > >python's implementation of timsort through cpyth

Re: A Beginner's Doubt

2013-06-19 Thread Chris Angelico
On Thu, Jun 20, 2013 at 2:53 AM, Joshua Landau wrote: > Now, as I'm probably the most new programmer here I'll point out that > I don't agree with Chris when he says that: > >> One way or >> another, you will probably spend the next week writing code you throw >> away; if you try to tackle the pri

Re: A Beginner's Doubt

2013-06-19 Thread Joshua Landau
Please be aware, Augusto, that Rick is known to be a bit... OTT. Don't take him too seriously (but he's not an idiot either). On 19 June 2013 14:58, wrote: > Hello! > This is my first post in this group and the reason why I came across here is > that, despite my complete lack of knowledge in th

RE: How much memory does Django consume compared to Rails?

2013-06-19 Thread Andriy Kornatskyy
A memory consumption by python web frameworks is relatively low. A `typical` web site developed using wheezy.web (a lightweight full-featured web framework) consumes about 14-23 Mb per worker on x86 platform. The django is not far from there. A minimal django hello world application hosted in u

Re: decorator to fetch arguments from global objects

2013-06-19 Thread Terry Reedy
On 6/19/2013 4:03 AM, Wolfgang Maier wrote: Wolfgang Maier biologie.uni-freiburg.de> writes: andrea crotti gmail.com> writes: 2013/6/18 Terry Reedy udel.edu> Decorators are only worthwhile if used repeatedly. What you specified can easily be written, for instance, as def save_doc(db=No

Re: Writing Extensions for Python 3 in C

2013-06-19 Thread Terry Reedy
On 6/18/2013 6:24 AM, Aditya Avinash wrote: Hi. This is the last place where I want to ask a question. I have searched for lots of tutorials and documentation on the web but, didn't find a decent one to develop extensions for Python 3 using a custom compiler (mingw32, nvcc). Please help me. I w

Re: A Beginner's Doubt

2013-06-19 Thread Joel Goldstick
On Wed, Jun 19, 2013 at 11:31 AM, Rick Johnson wrote: > On Wednesday, June 19, 2013 8:58:19 AM UTC-5, augus...@gmail.com wrote: > > This is my first post in this group and the reason why I > > came across here is that, despite my complete lack of > > knowledge in the programming area, I received

Re: Idea for key parameter in all() builting, would it be feasible?

2013-06-19 Thread russ . pobox
>All you need is the iterator version of map(). In Python 3, that's the >normal map(); in Python 2, use this: from itertools import imap all(imap(lambda x: bool(x), xrange(10**9))) >False >It's roughly instant, like you would expect. >ChrisA This probably isn't the way to post a reply

Re: Idea for key parameter in all() builting, would it be feasible?

2013-06-19 Thread Chris Angelico
On Thu, Jun 20, 2013 at 2:32 AM, wrote: >>All you need is the iterator version of map(). In Python 3, that's the >>normal map(); in Python 2, use this: > > from itertools import imap > all(imap(lambda x: bool(x), xrange(10**9))) >>False > >>It's roughly instant, like you would expect. > >

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
On Wednesday, June 19, 2013 11:47:36 AM UTC-2:30, Rick Johnson wrote: > On Tuesday, June 18, 2013 9:47:34 PM UTC-5, andrew...@gmail.com wrote: > > > > > I'm looking at developing a program for work that can be > > > distributed to others (i.e. and exe file). The > > > application would open v

Re: Idea for key parameter in all() builting, would it be feasible?

2013-06-19 Thread Chris Angelico
On Thu, Jun 20, 2013 at 2:14 AM, wrote: > And the following, although the same thing really as all(xrange(10**9)), is > not as instant and will take even longer than the above. > all(map(lambda x: bool(x), xrange(10**9))) > > However if all by some chance (I don't know how this stuff works

Idea for key parameter in all() builting, would it be feasible?

2013-06-19 Thread russ . pobox
I was mucking around, trying to code a prime sieve in one line. I don't know about filters and bit shifting and stuff like that but I thought I could do it with builtins, albeit a very long one line. This is the part of my stupid trick in question that got me wondering about a key parameter for

How much memory does Django consume compared to Rails?

2013-06-19 Thread Jason Hsu
I have deployed two Ruby on Rails sites on WebFaction, and Passenger Rack takes up around 60 MB of memory apiece. I was planning on replacing my Drupal web sites with Rails, but I'm now considering replacing these Drupal sites with Django. Given that the baseline memory consumption for a Rails

Question about using dictionaries and QTableWidget

2013-06-19 Thread Sara Lochtie
I have a table that gets new entries added to it in real time. Each entry has an ID and I am storing the ID in a dictionary. What I am trying to do is to have each ID in its own row and update within that row instead of adding a new one each time. What I've done is store the ID in a dictionary

Re: A Beginner's Doubt

2013-06-19 Thread Rick Johnson
On Wednesday, June 19, 2013 8:58:19 AM UTC-5, augus...@gmail.com wrote: > This is my first post in this group and the reason why I > came across here is that, despite my complete lack of > knowledge in the programming area, I received an order > from my teacher to develop a visually interactive pro

Re: A Beginner's Doubt

2013-06-19 Thread Neil Cerutti
On 2013-06-19, augusto...@gmail.com wrote: > This is my first post in this group and the reason why I came > across here is that, despite my complete lack of knowledge in > the programming area, I received an order from my teacher to > develop a visually interactive program, until 20th July, so we

Re: A Beginner's Doubt

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 11:58 PM, wrote: > My goal is to learn and program it by myself, as good as the time allows me. > That said, what I seek here is advice from people who definitively have more > experience than me on topics like: is it possible to develop this kind of > program in such a

Re: Beginner Question: 3D Models

2013-06-19 Thread Rick Johnson
On Tuesday, June 18, 2013 9:47:34 PM UTC-5, andrew...@gmail.com wrote: > I'm looking at developing a program for work that can be > distributed to others (i.e. and exe file). The > application would open various dialogue boxes and ask the > user for input and eventually perform mathematical > cal

Re: Beginner Question: 3D Models

2013-06-19 Thread Fábio Santos
On Wed, Jun 19, 2013 at 2:57 PM, Oscar Benjamin wrote: > On 19 June 2013 14:14, wrote: >> This sounds similar to what I might want. So you know of any online >> tutorials for this? > > It's hard to tell what you're referring to since you haven't included > any quoted context in your message (li

A Beginner's Doubt

2013-06-19 Thread augustofec
Hello! This is my first post in this group and the reason why I came across here is that, despite my complete lack of knowledge in the programming area, I received an order from my teacher to develop a visually interactive program, until 20th July, so we can participate in a kind of contest. My

Re: Beginner Question: 3D Models

2013-06-19 Thread Oscar Benjamin
On 19 June 2013 14:14, wrote: > This sounds similar to what I might want. So you know of any online tutorials > for this? It's hard to tell what you're referring to since you haven't included any quoted context in your message (like I have above). I'll assume you're referring to what Fábio said

Re: another language with classes?

2013-06-19 Thread Ivan Shmakov
> R Kantas writes: [Cross-posting to news:comp.lang.python, news:comp.lang.scheme, looking for more first-hand experience with these. Sadly, there's no news:comp.lang.go as of yet.] > I came into first contact with objects and classes programming under > Visual Bas

Re: Why is regex so slow?

2013-06-19 Thread Duncan Booth
Roy Smith wrote: > Except that the complexity in regexes is compiling the pattern down to > a FSM. Once you've got the FSM built, the inner loop should be pretty > quick. In C, the inner loop for executing a FSM should be something > like: > > for(char* p = input; p; ++p) { > next_state =

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
This sounds similar to what I might want. So you know of any online tutorials for this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
As I've said, I'm a fairly novice. I've compiled simple VB programs previously into exe files for use but nothing with pyton and nothing of this complexity. This application could potentially be distributed to hundreds of people throughout the world as our company is worldwide. Asking these peop

Re: weird behavior. bug perhaps?

2013-06-19 Thread rusi
On Jun 18, 8:31 pm, zoom wrote: > > yes, that's the hing. > > thanks a lot > > FYI this happens because >  >>> shape(mean(m,1)) > (4, 1) >  >>> shape(mean(array(m),1)) > (4,) > > thanks again And thank you for the 'Thank you' !! Given the noob-questions the list is currently dealing with, your q

Re: Beginner Question: 3D Models

2013-06-19 Thread Fábio Santos
On 19 Jun 2013 12:56, "Oscar Benjamin" wrote: > > On 19 June 2013 12:13, wrote: > > > > I've seen some information on Blender. Is it possible to have the entire program contained within a single exe (or exe and some other files) so that it can be passed around and used by others without having

Re: Beginner Question: 3D Models

2013-06-19 Thread Oscar Benjamin
On 19 June 2013 12:13, wrote: > > I've seen some information on Blender. Is it possible to have the entire > program contained within a single exe (or exe and some other files) so that > it can be passed around and used by others without having to install blender? I don't know if Blender woul

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
On Wednesday, June 19, 2013 3:30:41 AM UTC-2:30, Christian Gollwitzer wrote: > Am 19.06.13 04:47, schrieb andrewblun...@gmail.com: > > > However, for one part of the program I'd like to be able to create a > > > 3D model based on the user input. The model would be very basic > > > consisting of

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
On Wednesday, June 19, 2013 12:50:52 AM UTC-2:30, Steven D'Aprano wrote: > On Tue, 18 Jun 2013 19:47:34 -0700, andrewblundon wrote: > > > > > However, for one part of the program I'd like to be able to create a 3D > > > model based on the user input. The model would be very basic consisting >

Re: Don't feed the troll...

2013-06-19 Thread Antoon Pardon
Op 19-06-13 05:46, ru...@yahoo.com schreef: > On 06/18/2013 02:22 AM, Antoon Pardon wrote: >> Op 17-06-13 19:56, ru...@yahoo.com schreef: > I was using the photodetector/light system as a emotion-free > analog of the troll/troll-feeders positive feedback system for > which you claimed it was clea

Re: Writing Extensions for Python 3 in C

2013-06-19 Thread Ulrich Eckhardt
Am 18.06.2013 12:24, schrieb Aditya Avinash: Hi. This is the last place where I want to ask a question. You are probably not saying what you mean here. The meaning of your sentence is more like "Here is the forum that I dislike more than any other forum, but still I have to ask a question her

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 6:55 PM, Steven D'Aprano wrote: > On Wed, 19 Jun 2013 18:21:40 +1000, Chris Angelico wrote: > >> You can't reference an object without >> somewhere having either a name or a literal to start it off. > > True, but not necessarily a name bound to the object you are thinking o

Re: Writing Extensions for Python 3 in C

2013-06-19 Thread Robin Becker
On 18/06/2013 11:24, Aditya Avinash wrote: Hi. This is the last place where I want to ask a question. I have searched for lots of tutorials and documentation on the web but, didn't find a decent one to develop extensions for Python 3 using a custom compiler (mingw32, nvcc). Please help me. PS: Do

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Steven D'Aprano
On Wed, 19 Jun 2013 18:21:40 +1000, Chris Angelico wrote: > You can't reference an object without > somewhere having either a name or a literal to start it off. True, but not necessarily a name bound to the object you are thinking of: some_function() gives you an object, but it's not a literal,

Re: Why is regex so slow?

2013-06-19 Thread Johannes Bauer
On 18.06.2013 22:30, Grant Edwards wrote: > All the O() tells you is the general shape of the line. Nitpick: it only gives an *upper bound* for the complexity. Any function that is within O(n) is also within O(n^2). Usually when people say O() they actually mean capital Thetha (which is the corre

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 6:06 PM, Dave Angel wrote: > On 06/19/2013 03:14 AM, Chris Angelico wrote: >> >> On Wed, Jun 19, 2013 at 3:42 PM, Dave Angel wrote: >>> >>> Names are *one of* the ways we specify which objects are to be used. (We >>> can >>> also specify objects via an container and a subs

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Dave Angel
On 06/19/2013 03:14 AM, Chris Angelico wrote: On Wed, Jun 19, 2013 at 3:42 PM, Dave Angel wrote: Names are *one of* the ways we specify which objects are to be used. (We can also specify objects via an container and a subscript or slice, or via an attribute of another object. And probably anot

Re: decorator to fetch arguments from global objects

2013-06-19 Thread Wolfgang Maier
Wolfgang Maier biologie.uni-freiburg.de> writes: > > andrea crotti gmail.com> writes: > > > 2013/6/18 Terry Reedy udel.edu> > > > > Decorators are only worthwhile if used repeatedly. What you specified can > easily be written, for instance, as > > def save_doc(db=None): > >   if db is None:

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Νίκος
Στις 19/6/2013 8:08 πμ, ο/η Tim Roberts έγραψε: Nick the Gr33k wrote: On 16/6/2013 4:55 ??, Tim Roberts wrote: Nick the Gr33k wrote: Because Python lets you use arbitrary values in a Boolean context, the net result is exactly the same. What is an arbitrary value? don even knwo what arbitr

Re: Don't feed the troll...

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 5:27 PM, Steven D'Aprano wrote: > On Wed, 19 Jun 2013 17:07:28 +1000, Chris Angelico wrote: > >> On the contrary, stereotyping is "You are-a , therefore you >> will behave in ". > > I don't think that's how stereotypes usually work. > > "He wears a turban, therefore he's an

Writing Extensions for Python 3 in C

2013-06-19 Thread Aditya Avinash
Hi. This is the last place where I want to ask a question. I have searched for lots of tutorials and documentation on the web but, didn't find a decent one to develop extensions for Python 3 using a custom compiler (mingw32, nvcc). Please help me. PS: Don't point me to Python Documentation. It is n

Re: decorator to fetch arguments from global objects

2013-06-19 Thread Wolfgang Maier
andrea crotti gmail.com> writes: > > 2013/6/18 Terry Reedy udel.edu> > On 6/18/2013 5:47 AM, andrea crotti wrote: > Using a CouchDB server we have a different database object potentially > for every request. > We already set that db in the request object to make it easy to pass it > around for

Re: Don't feed the troll...

2013-06-19 Thread Steven D'Aprano
On Wed, 19 Jun 2013 17:07:28 +1000, Chris Angelico wrote: > On the contrary, stereotyping is "You are-a , therefore you > will behave in ". I don't think that's how stereotypes usually work. "He wears a turban, therefore he's an Arab terrorist." "He's wearing black, has pale skin, listens to t

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 3:42 PM, Dave Angel wrote: > Names are *one of* the ways we specify which objects are to be used. (We can > also specify objects via an container and a subscript or slice, or via an > attribute of another object. And probably another way or two.) But you always have to bo

Re: Don't feed the troll...

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 1:49 PM, wrote: > On 06/18/2013 01:21 AM, Chris Angelico wrote: >> On Tue, Jun 18, 2013 at 2:39 PM, alex23 wrote: >>> tl;dr Stop acting like a troll and we'll stop perceiving you as such. >> >> This being Python-list, we duck-type. You don't have to declare that >> you're