Re: Python for philosophers

2013-05-12 Thread Steven D'Aprano
On Sun, 12 May 2013 16:17:02 +0200, Citizen Kant wrote: > Thank you very much for your answers. > > I'm afraid that, at this stage, I must prevent myself from "knowing too > much" about the subject. My idea here is trying to fill the gaps, > mostly, using intuition. Then you are doomed to failur

Re: Python for philosophers

2013-05-12 Thread Steven D'Aprano
On Mon, 13 May 2013 12:34:13 +1200, Gregory Ewing wrote: > In the most general terms, the Python interpeter (or any other computer > system, for that matter) can be thought of as something with an internal > state, and a transition function that takes the state together with some > input and produ

Re: Python for philosophers

2013-05-12 Thread Steven D'Aprano
On Sat, 11 May 2013 22:03:15 +0200, Citizen Kant wrote: > Hi, > this could be seen as an extravagant subject but that is not my original > purpose. I still don't know if I want to become a programmer or not. At > this moment I'm just inspecting the environment. Towards what purpose? Do you want

Re: Python for philosophers

2013-05-12 Thread Gregory Ewing
Citizen Kant wrote: What I do here is to try to "understand". That's different from just knowing. Knowledge growth must be consequence of understanding's increasing. As the scope of my understanding increases, the more I look for increasing my knowledge. Never vice versa, because, knowing isn'

Re: object.enable() anti-pattern

2013-05-12 Thread Fábio Santos
On 13 May 2013 00:22, "Greg Ewing" wrote: > > Wayne Werner wrote: >> >> On Fri, 10 May 2013, Gregory Ewing wrote: >> >>> f = open("myfile.dat") >>> f.close() >>> data = f.read() >> >> >> To clarify - you don't want a class that has functions that need to be called in a certain order with *va

Re: Python for philosophers

2013-05-12 Thread alex23
On May 13, 12:30 am, Steven D'Aprano wrote: > If you are interested in the intersection of programming and philosophy, > I strongly recommend that you read "Gödel, Escher, Bach: An Eternal > Golden Braid" by Douglas R. Hofstadter. +1 -- http://mail.python.org/mailman/listinfo/python-list

Re: in need of some help...

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 9:47 AM, Dennis Lee Bieber wrote: > On Mon, 13 May 2013 08:18:05 +1000, Chris Angelico > declaimed the following in gmane.comp.python.general: > >> >> No, Chris (not me, the other Chris... *an*other Chris okay, one of >> the chorus of Chrises of this list!) did mean Gm

Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Rotwang
On 13/05/2013 00:40, Ian Kelly wrote: On Sun, May 12, 2013 at 5:23 PM, Mr. Joe wrote: I seem to stumble upon a situation where "!=" operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - The != o

Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Ian Kelly
On Sun, May 12, 2013 at 5:23 PM, Mr. Joe wrote: > I seem to stumble upon a situation where "!=" operator misbehaves in > python2.x. Not sure if it's my misunderstanding or a bug in python > implementation. Here's a demo code to reproduce the behavior - The != operator is implemented by the __ne__

Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Christian Heimes
Am 13.05.2013 01:23, schrieb Mr. Joe: > I seem to stumble upon a situation where "!=" operator misbehaves in > python2.x. Not sure if it's my misunderstanding or a bug in python > implementation. Here's a demo code to reproduce the behavior - > """ Python 2.7 doesn't use the negation of __eq__ whe

Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Ned Batchelder
On 5/12/2013 7:23 PM, Mr. Joe wrote: I seem to stumble upon a situation where "!=" operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - """ # -*- coding: utf-8 -*- from __future__ import unicode_li

Differences of "!=" operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Mr. Joe
I seem to stumble upon a situation where "!=" operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - """ # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function class DemoClass

Re: object.enable() anti-pattern

2013-05-12 Thread Greg Ewing
Wayne Werner wrote: On Fri, 10 May 2013, Gregory Ewing wrote: f = open("myfile.dat") f.close() data = f.read() To clarify - you don't want a class that has functions that need to be called in a certain order with *valid input* in order to not crash. Exactly what does happen - a Value

Re: in need of some help...

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 8:58 AM, Jens Thoms Toerring wrote: > Chris Angelico wrote: >> On Mon, May 13, 2013 at 7:56 AM, Jens Thoms Toerring >> wrote: >> > Chris “Kwpolska” Warrick wrote: >> >> Gmail automatically hides long quotes. This is helpful in situations >> >> like this one. More mail

Re: in need of some help regarding my rock paper scissors game

2013-05-12 Thread Dave Angel
On 05/12/2013 03:33 PM, Alex Norton wrote: im new to python and im in the middle of making a RPS game for a college unit. i have used PyQt to create the GUI and i have received help regarding adding the code to the buttons. I'm not at all familiar with PyQT, but I have used other GUIs, and I'm

Re: in need of some help...

2013-05-12 Thread Jens Thoms Toerring
Chris Angelico wrote: > On Mon, May 13, 2013 at 7:56 AM, Jens Thoms Toerring wrote: > > Chris “Kwpolska” Warrick wrote: > >> Gmail automatically hides long quotes. This is helpful in situations > >> like this one. More mail software should implement that > >> functionality. Seriously: once yo

Re: in need of some help...

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 7:56 AM, Jens Thoms Toerring wrote: > Chris “Kwpolska” Warrick wrote: >> Gmail automatically hides long quotes. This is helpful in situations >> like this one. More mail software should implement that >> functionality. Seriously: once you go Gmail, you never go back. >

Re: in need of some help...

2013-05-12 Thread Jens Thoms Toerring
Chris “Kwpolska” Warrick wrote: > (slightly offtopic, sorry.) > On Sun, May 12, 2013 at 12:20 AM, Jens Thoms Toerring > wrote: > > PS: If I may ask you a favor: consider refraining from using Google's > > completely broken interface to newsgroups - your post consists > > of nearly 200 l

Re: Old version docs don't link to current version

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 5:32 AM, Terry Jan Reedy wrote: > On 5/12/2013 10:12 AM, Chris Angelico wrote: >> >> Was this intentional, along the lines of not touching the old and >> unsupported docs? > > Cross referencing was added while 3.2 docs were still subject to revision. > x.y docs are essentia

Re: Python for philosophers

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 4:13 AM, llanitedave wrote: > On Sunday, May 12, 2013 7:51:28 AM UTC-7, Chris Angelico wrote: >> On Mon, May 13, 2013 at 12:17 AM, Citizen Kant wrote: >> >> > Maybe It'd be good if I explain myself a bit more. What I'm trying here is >> >> > to grasp Python from the game's

Re: Message passing syntax for objects | OOPv2

2013-05-12 Thread Terry Jan Reedy
On 5/12/2013 1:18 PM, Ned Batchelder wrote: On 5/8/2013 10:39 PM, Mark Janssen wrote: ...The field needs re-invented and re-centered.[...] For anyone who want to be involved. See the wikiwikiweb -- a tool that every programmer should know and use -- and these pages: ComputerScienceVersionTwo

Re: object.enable() anti-pattern

2013-05-12 Thread Terry Jan Reedy
On 5/12/2013 12:48 PM, Wayne Werner wrote: I'll share the anti-pattern that I've seen many times (not actually in Python) class CoolPresenter: def __init__(self): self.view = None self.some_property = None self.other_property = None

Re: object.enable() anti-pattern

2013-05-12 Thread Terry Jan Reedy
On 5/12/2013 1:14 PM, Wayne Werner wrote: On Fri, 10 May 2013, Gregory Ewing wrote: Wayne Werner wrote: You don't ever want a class that has functions that need to be called in a certain order to *not* crash. That seems like an overly broad statement. What do you think the following should d

Re: in need of some help regarding my rock paper scissors game

2013-05-12 Thread Benjamin Kaplan
On Sun, May 12, 2013 at 12:33 PM, Alex Norton wrote: > im new to python and im in the middle of making a RPS game for a college > unit. > > i have used PyQt to create the GUI and i have received help regarding adding > the code to the buttons. > > but its missing something as the error > > 'Traceb

Re: in need of some help...

2013-05-12 Thread Alex Norton
On Saturday, 11 May 2013 23:20:13 UTC+1, Jens Thoms Toerring wrote: > Alex Norton wrote: > > > On Wednesday, 1 May 2013 13:15:28 UTC+1, Jens Thoms Toerring wrote: > > > > Of course, it might be nicer to have a "result" label some- > > > > where in the graphical interface which you set to the

in need of some help regarding my rock paper scissors game

2013-05-12 Thread Alex Norton
im new to python and im in the middle of making a RPS game for a college unit. i have used PyQt to create the GUI and i have received help regarding adding the code to the buttons. but its missing something as the error 'Traceback (most recent call last): File "C:\Users\Me\Desktop\testy.py", lin

Re: Old version docs don't link to current version

2013-05-12 Thread Terry Jan Reedy
On 5/12/2013 10:12 AM, Chris Angelico wrote: Not sure if this is an oversight or something deliberate... could be either. From http://docs.python.org/3.0/library/http.server.html there's no link to the current docs, even though from http://docs.python.org/3/library/http.server.html it's possibl

Re: Red Black Tree implementation?

2013-05-12 Thread duncan smith
On 12/05/13 03:02, duncan smith wrote: On 12/05/13 02:29, Dan Stromberg wrote: On Sat, May 11, 2013 at 4:24 PM, Dan Stromberg mailto:drsali...@gmail.com>> wrote: [snip] What should BinaryTree.find() do if it finds a data.node that is None? A call to "find(data)" should find and return e

Re: Python for philosophers

2013-05-12 Thread llanitedave
On Sunday, May 12, 2013 7:51:28 AM UTC-7, Chris Angelico wrote: > On Mon, May 13, 2013 at 12:17 AM, Citizen Kant wrote: > > > Maybe It'd be good if I explain myself a bit more. What I'm trying here is > > > to grasp Python from the game's abstraction point of view, as if it were, > > > for exam

Re: Message passing syntax for objects | OOPv2

2013-05-12 Thread Ned Batchelder
On 5/8/2013 10:39 PM, Mark Janssen wrote: ...The field needs re-invented and re-centered.[...] For anyone who want to be involved. See the wikiwikiweb -- a tool that every programmer should know and use -- and these pages: ComputerScienceVersionTwo and ObjectOrientedRefactored. I've never un

Re: object.enable() anti-pattern

2013-05-12 Thread Wayne Werner
On Fri, 10 May 2013, Gregory Ewing wrote: Wayne Werner wrote: You don't ever want a class that has functions that need to be called in a certain order to *not* crash. That seems like an overly broad statement. What do you think the following should do? f = open("myfile.dat") f.close()

Re: object.enable() anti-pattern

2013-05-12 Thread Wayne Werner
On Fri, 10 May 2013, Robert Kern wrote: On 2013-05-10 12:00, Steven D'Aprano wrote: But either way, that's fine. You've found an object where it does make sense to have an explicit "make it go" method: first one entity has permission to construct the object, but not to open the underlying file

Re: in need of some help...

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 1:59 AM, Chris “Kwpolska” Warrick wrote: > On Sun, May 12, 2013 at 12:20 AM, Jens Thoms Toerring > wrote: >> PS: If I may ask you a favor: consider refraining from using Google's >> completely broken interface to newsgroups - your post consists >> of nearly 200 li

Re: Python for philosophers

2013-05-12 Thread rusi
On May 12, 7:17 pm, Citizen Kant wrote: > Maybe It'd be good if I explain myself a bit more. What I'm trying here is > to grasp Python from the game's abstraction point of view, as if it were, > for example, chess. That's why I need a real_player to point me to: (so to > speak, I wish I could expr

Re: in need of some help...

2013-05-12 Thread Chris “Kwpolska” Warrick
(slightly offtopic, sorry.) On Sun, May 12, 2013 at 12:20 AM, Jens Thoms Toerring wrote: > PS: If I may ask you a favor: consider refraining from using Google's > completely broken interface to newsgroups - your post consists > of nearly 200 lines of text containing all I wrote, with an e

Re: Python for philosophers

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 12:17 AM, Citizen Kant wrote: > Maybe It'd be good if I explain myself a bit more. What I'm trying here is > to grasp Python from the game's abstraction point of view, as if it were, > for example, chess. Maybe you're going for something a little too complicated. Let's boi

Re: Python for philosophers

2013-05-12 Thread Steven D'Aprano
On Sun, 12 May 2013 04:15:30 -0400, Devin Jeanpierre wrote: > On Sun, May 12, 2013 at 1:17 AM, Steven D'Aprano > wrote: >> On Sat, 11 May 2013 21:45:12 -0700, rusi wrote: >> >>> I have on occasion expressed that newcomers to this list should be >>> treated with more gentleness than others. And si

Re: Python for philosophers

2013-05-12 Thread Steven D'Aprano
On Sun, 12 May 2013 16:17:02 +0200, Citizen Kant wrote: > Any clue about this would be highly appreciated. If you are interested in the intersection of programming and philosophy, I strongly recommend that you read "Gödel, Escher, Bach: An Eternal Golden Braid" by Douglas R. Hofstadter. --

Re: Python for philosophers

2013-05-12 Thread Citizen Kant
Thank you very much for your answers. I'm afraid that, at this stage, I must prevent myself from "knowing too much" about the subject. My idea here is trying to fill the gaps, mostly, using intuition. What I do here is to try to "understand". That's different from just knowing. Knowledge growth mu

Old version docs don't link to current version

2013-05-12 Thread Chris Angelico
Not sure if this is an oversight or something deliberate... could be either. >From http://docs.python.org/3.0/library/http.server.html there's no link to the current docs, even though from http://docs.python.org/3/library/http.server.html it's possible to switch to 3.2 and then back to 3.3 (or to

Re: Python for philosophers

2013-05-12 Thread Devin Jeanpierre
On Sun, May 12, 2013 at 1:17 AM, Steven D'Aprano wrote: > On Sat, 11 May 2013 21:45:12 -0700, rusi wrote: > >> I have on occasion expressed that newcomers to this list should be >> treated with more gentleness than others. And since my own joking may be >> taken amiss, let me hasten to add (to the