Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread Antoon Pardon
you have made it public that this will likely work. That certainly makes you naive and a fool. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: Apache and suexec issue that wont let me run my python script

2013-06-12 Thread Antoon Pardon
credit card for an organisation, gives the security code to a stranger and then complains the stranger moved a lot of money from one bank account to another (although all owned by you). Sure the stranger had no business doing that, but you sure were violating the trust of the organisation by acting so

Re: A few questiosn about encoding

2013-06-14 Thread Antoon Pardon
t. You should remember that python (or any programming language) doesn't print numbers. It always prints string representations of numbers. It is just so that we are so used to the decimal representation that we think of that representation as being the number. Normally that is not a problem but it can cause confusion when you are working with mulitple representations. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: A few questiosn about encoding

2013-06-14 Thread Antoon Pardon
Op 14-06-13 09:49, Nick the Gr33k schreef: > On 14/6/2013 10:36 πμ, Antoon Pardon wrote: >> Op 13-06-13 10:08, Νικόλαος Κούρας schreef: >>> >>> Indeed python embraced it in single quoting '0b10001011010' and >>> not as 0b10001011010 which in

Re: A few questiosn about encoding

2013-06-14 Thread Antoon Pardon
Op 14-06-13 10:37, Nick the Gr33k schreef: > On 14/6/2013 11:22 πμ, Antoon Pardon wrote: > >>> Python prints numbers: >> No it doesn't, numbers are abstract concepts that can be represented in >> various notations, these notations are strings. Those notaional strin

Re: Don't feed the troll...

2013-06-14 Thread Antoon Pardon
otational string, which is then displayed. This to clear you of your confusion between numerals and numbers which you displayed by writing something like "the binary representation as a number" -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't feed the troll...

2013-06-14 Thread Antoon Pardon
Op 14-06-13 14:36, Nick the Gr33k schreef: > On 14/6/2013 2:09 μμ, Antoon Pardon wrote: >> Op 14-06-13 11:32, Nick the Gr33k schreef: >>> I'mm not trolling man, i just have hard time understanding why numbers >>> acts as strings. >> They don't. No body c

Re: A few questiosn about encoding

2013-06-14 Thread Antoon Pardon
Op 14-06-13 14:59, Nick the Gr33k schreef: > On 14/6/2013 1:50 μμ, Antoon Pardon wrote: >> Python works with numbers, but at the moment >> it has to display such a number it has to produce something >> that is printable. So it will build a string that can be >> used as

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Antoon Pardon
ntributing to the annoyance of other list members by continuing "helping" nikos, I don'y see why other can't continue to the annoyance in a away that they themselves may find somewhat amusing. -- Antoon Pardon. -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't feed the troll...

2013-06-16 Thread Antoon Pardon
able. Or you think there is behaviour that is out of bounds and then you must consider the possiblity that Nikos behaviour is an example of that and that what you consider ugly responses are people trying to address that out of bound behaviour and that you responding to Nikos as you do for the moment i

Re: A few questiosn about encoding

2013-06-16 Thread Antoon Pardon
Op 15-06-13 02:28, Cameron Simpson schreef: > On 14Jun2013 15:59, Nikos as SuperHost Support wrote: > | So, a numeral = a string representation of a number. Is this correct? > > No, a numeral is an individual digit from the string representation of a > number. > So: 65 requires two numerals: '6'

Re: Don't feed the troll...

2013-06-17 Thread Antoon Pardon
Op 16-06-13 22:04, Steven D'Aprano schreef: > On Sun, 16 Jun 2013 20:16:34 +0200, Antoon Pardon wrote: > >> You are trying to get it both ways. On the one hand you try to argue >> that there are no boundaries > I have never, ever argued that there are no boundaries. I

Re: Don't feed the troll...

2013-06-17 Thread Antoon Pardon
ehow punishing Nikos for his behaviour, although it may make the environment even less nice in the short term, may help to make the environment as nice again as it was before Nikos started his quest for spoon feeders. While reinforcing bad bahaviour provides no hope at all for that. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't feed the troll...

2013-06-17 Thread Antoon Pardon
Op 17-06-13 07:04, Ferrous Cranus schreef: > On 17/6/2013 6:46 πμ, ru...@yahoo.com wrote: >> I could be wrong but I don't think Nikos is a pure troll -- >> someone motivated purely by provoking reaction and discord. >> He has a real website and his problems with Python seem like >> genuine problem

Re: A few questiosn about encoding

2013-06-17 Thread Antoon Pardon
Op 17-06-13 09:08, Cameron Simpson schreef: > On 17Jun2013 08:49, Antoon Pardon wrote: > | Op 15-06-13 02:28, Cameron Simpson schreef: > | > On 14Jun2013 15:59, Nikos as SuperHost Support > wrote: > | > | So, a numeral = a string representation of a number. Is this corre

Re: A few questiosn about encoding

2013-06-17 Thread Antoon Pardon
Op 17-06-13 09:08, Cameron Simpson schreef: > On 17Jun2013 08:49, Antoon Pardon wrote: > | Op 15-06-13 02:28, Cameron Simpson schreef: > | > On 14Jun2013 15:59, Nikos as SuperHost Support > wrote: > | > | So, a numeral = a string representation of a number. Is this corre

Re: RFD: rename comp.lang.python to comp.support.superhost

2013-06-17 Thread Antoon Pardon
ge threads, Nikos won't be the only one kill-filed. If you have nothing helpful to say, send it to /dev/null. So you don't mind playing the Internet Police if it is about behaviour that bothers you? -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't feed the troll...

2013-06-17 Thread Antoon Pardon
ng a hospitable place, you don't encourage asocial behaviour. His behaviour may not bother you so much, but that shouldn't be the norm because others are less bothered with the barrage of insults Nikos is now receiving than with Nikos vampirizing this list, because they consider those insults de

Re: Don't feed the troll...

2013-06-18 Thread Antoon Pardon
Op 17-06-13 19:56, ru...@yahoo.com schreef: > On 06/17/2013 02:15 AM, Antoon Pardon wrote: >> Op 17-06-13 05:46, ru...@yahoo.com schreef: >>> On 06/16/2013 02:04 PM, Steven D'Aprano wrote: >>> >>>> Yes. Trying to start flame wars with Nikos is unaccept

Re: Don't feed the troll...

2013-06-18 Thread Antoon Pardon
Op 18-06-13 01:02, Steven D'Aprano schreef: > On Mon, 17 Jun 2013 09:31:53 +0200, Antoon Pardon wrote: > >> Op 16-06-13 22:04, Steven D'Aprano schreef: >>> On Sun, 16 Jun 2013 20:16:34 +0200, Antoon Pardon wrote: >>> >>>> You are trying t

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

Re: Don't feed the troll...

2013-06-20 Thread Antoon Pardon
Op 19-06-13 20:40, Ian Kelly schreef: > 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. > Co

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

2013-06-20 Thread Antoon Pardon
Op 19-06-13 18:14, russ.po...@gmail.com schreef: > all(map(lambda x: bool(x), xrange(10**9))) Since you already have your answer, I just like to get your attention to the fact the the lambda is superfluous here. Your expression above is equivallent to all(map(bool, xrange(10**9))) -- ht

Re: Don't feed the troll...

2013-06-21 Thread Antoon Pardon
Op 21-06-13 04:40, Ian Kelly schreef: > On Thu, Jun 20, 2013 at 3:41 AM, Antoon Pardon > wrote: >> There are two problems with your reasoning. The first is that you >> are equivocating on "expect". "Expect" can mean you will be surprised >> if it doesn

Re: Don't feed the troll...

2013-06-21 Thread Antoon Pardon
Op 19-06-13 23:13, ru...@yahoo.com schreef: 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: I don't remember making such a claim. What I do remember is you among others claiming that the problem wa

Re: Default Value

2013-06-22 Thread Antoon Pardon
Op 22-06-13 03:27, Ian Kelly schreef: On Fri, Jun 21, 2013 at 7:15 PM, Steven D'Aprano wrote: On Fri, 21 Jun 2013 23:49:51 +0100, MRAB wrote: On 21/06/2013 21:44, Rick Johnson wrote: [...] Which in Python would be the "MutableArgumentWarning". *school-bell* I notice that you've omitted

Re: Don't feed the troll...

2013-06-24 Thread Antoon Pardon
Op 23-06-13 16:29, ru...@yahoo.com schreef: > On 06/21/2013 01:32 PM, Antoon Pardon wrote: >> Op 19-06-13 23:13, ru...@yahoo.com schreef: >>> The troll is outside the volition of the group and so his >>> appearance is effectively an act of nature. >> >>

Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment)

2013-06-24 Thread Antoon Pardon
f you have a global variable with the same name, that global variable will just for the duration of the function become inaccessible. The quick solution in this case is to include a global statement. Something like def change(event) global isWhite ... -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Antoon Pardon
hon standard library still contains that kind of code. At least it did in 3.2 and I saw nothing in the 3.3 release notes that would make me suspect this has changed. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the semantics meaning of 'object'?

2013-06-26 Thread Antoon Pardon
Op 26-06-13 00:27, Mark Janssen schreef: >> The main problem is getting to the top/end of the call chain. Classic >> example is with __init__, but the same problem can also happen with >> other calls. Just a crazy theory, but would it be possible to >> construct a black-holing object that, for any

Re: Don't feed the troll...

2013-06-26 Thread Antoon Pardon
Op 25-06-13 17:56, ru...@yahoo.com schreef: On 06/24/2013 07:37 AM, Antoon Pardon wrote: Op 23-06-13 16:29, ru...@yahoo.com schreef: On 06/21/2013 01:32 PM, Antoon Pardon wrote: Op 19-06-13 23:13, ru...@yahoo.com schreef: [...] I put forward what I thought was a rational way of thinking

Re: Don't feed the troll...

2013-06-27 Thread Antoon Pardon
Op 25-06-13 19:25, Ian Kelly schreef: On Mon, Jun 24, 2013 at 7:37 AM, Antoon Pardon wrote: What do you mean with not a participant in the past? As far as I can see his first appearance was in dec 2011. That is over a year ago. It also seems that he always find people willing to engage with

Re: Don't feed the troll...

2013-06-28 Thread Antoon Pardon
Op 26-06-13 23:02, Ian Kelly schreef: On Wed, Jun 26, 2013 at 1:46 PM, Antoon Pardon wrote: But you didn't even go to the trouble of trying to find out what those concerns would be and how strong people feel about them. You just took your assumptions about those concerns for grante

Re: Closures in leu of pointers?

2013-06-29 Thread Antoon Pardon
tions or value containers or something like that. AFAICS there is no reason why "variable" wouldn't be appropiate for python names as opposed to C names. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: Closures in leu of pointers?

2013-06-30 Thread Antoon Pardon
Op 29-06-13 21:23, Ian Kelly schreef: On Sat, Jun 29, 2013 at 11:02 AM, Antoon Pardon wrote: Op 29-06-13 16:02, Michael Torrie schreef: The real problem here is that you don't understand how python variables work. And in fact, python does not have variables. It has names that bi

Re: Don't feed the troll...

2013-06-30 Thread Antoon Pardon
Op 28-06-13 19:20, Ian Kelly schreef: On Thu, Jun 27, 2013 at 12:13 PM, Antoon Pardon wrote: So what do you think would be a good approach towards people who are behaving in conflict with this wish of yours? Just bluntly call them worse than the troll or try to approach them in a way that is

Re: python adds an extra half space when reading from a string or list

2013-06-30 Thread Antoon Pardon
ve by your behaviour made yourself a reputation of being an incompetent inconsiderate jerk. You don't lose such a repuation by simply claiming you are not. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading from a string or list

2013-06-30 Thread Antoon Pardon
d. May that way he'll learn that if he doesn't want to be considered an incompetent inconsiderate jerk, he shouldn't behave like one. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't feed the troll...

2013-07-01 Thread Antoon Pardon
Op 30-06-13 19:50, Ian Kelly schreef: On Sun, Jun 30, 2013 at 11:25 AM, Antoon Pardon That is a bit odd. Rurpy seemed to consider it a big nono if others used methods that would coerce him to change his behaviour. But here you see shaming as an option which seems a coercive method. Well

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 09:52, Νίκος schreef: > Στις 1/7/2013 9:23 πμ, ο/η Antoon Pardon έγραψε: >>> Enough is enough. Iam not a troll, neither incompetent. Period. >> >> No not period. You have by your behaviour made yourself a reputation >> of being an incompetent inconsidera

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 09:55, Νίκος schreef: > Στις 1/7/2013 9:37 πμ, ο/η Antoon Pardon έγραψε: >>> Remember that Nick is as much a human as all of us, he is bound to >>> have his feelings hurt when so many people pick on him -- whether they >>> are justified or not. >>

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 11:05, Νίκος schreef: > Στις 1/7/2013 11:54 πμ, ο/η Antoon Pardon έγραψε: >>> So shut your piehole and start proving yourself useful in this list. >>> Or sod off. >>> Preferably do the latter. >> Oh we do have illusions of grandeur, don't we?

Re: File exists but Python says 'not found'.

2013-07-01 Thread Antoon Pardon
das._parser.TextReader.__cinit__ > (pandas\sr > c\parser.c:2846) > File "parser.pyx", line 512, in > pandas._parser.TextReader._setup_parser_source > (pandas\src\parser.c:4893) > IOError: File train.csv does not exist My guess is that train.csv is a symbolic link that points to a file that doesn't exist. So looking at your directory you can see an entry but actualy trying to open it will fail. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: File exists but Python says 'not found'.

2013-07-01 Thread Antoon Pardon
Op 01-07-13 12:57, preri...@gmail.com schreef: > The variable 'train' is being called like this -> > > def main(train='train.csv', test='test.csv', submit='logistic_pred.csv'): > print "Reading dataset..." > train_data = pd.read_csv(train) > test_data = pd.read_csv(test) > > Let me

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 11:37, Νίκος schreef: > Στις 1/7/2013 12:32 μμ, ο/η Antoon Pardon έγραψε: >> >> The above is a first class illustration of why I think you are >> problematic. We don't want you to explain yourself, we want >> you to change your behaviour. Someone be

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
of weeks to belittle me instead. I can't stand people who seem to think that only people who have helped them can give valid criticism. Yet here you are. It seems we'll both have to find a way in coping. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
swer to his question. Mark Laurence reacted questioning why this person didn't get the same kind of treatment as "Nick the Incompetant Greek". Then Nikos came in with an insulting remark. The rest developed from their. So nobody was trying to drive Nikos away (for asking ques

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 16:01, Walter Hurry schreef: On Mon, 01 Jul 2013 10:56:54 +0200, Antoon Pardon wrote: Op 01-07-13 09:55, Νίκος schreef: Στις 1/7/2013 9:37 πμ, ο/η Antoon Pardon έγραψε: Remember that Nick is as much a human as all of us, he is bound to have his feelings hurt when so many people

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 18:56, Joshua Landau schreef: To put things in perspective, these are the people who have been insulting on this post: Mark Lawrence (once, probably without meaning to be insulting) Nikos Antoon Pardon I don't consider something insulting if it can be supported by argumen

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 17:33, Steven D'Aprano schreef: On Mon, 01 Jul 2013 15:08:18 +0200, Antoon Pardon wrote: Op 01-07-13 14:43, Steven D'Aprano schreef: Νίκος, I am not going to wade through this long, long thread to see what problem you are trying to solve today. Nikos is not trying

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 02-07-13 01:17, Denis McMahon schreef: > On Mon, 01 Jul 2013 20:42:48 +0200, Antoon Pardon wrote: > >> How about the following comprimise. >> Let me know what you think about this. > How about you just ignore him. Why about you just ignore me? Serious, a lot of peop

Re: Don't feed the troll...

2013-07-02 Thread Antoon Pardon
experience you dismiss) as offensive as any troll. A lot of unfairness stays in the world because people find it unpleasant to fight it and even to observe fighting it. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading from a string or list

2013-07-02 Thread Antoon Pardon
of mind I'll make it clear I have no intention of haunting Nikos or of keeping him the subject of discussion. But should I stumble on a conversation in which his past behaviour is framed as him being innocentltly asking questions, I will point of what bullshit that is. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading from a string or list

2013-07-02 Thread Antoon Pardon
Op 01-07-13 21:32, Joshua Landau schreef: > On 1 July 2013 20:18, Antoon Pardon wrote: >> Op 01-07-13 17:33, Steven D'Aprano schreef: >> >>> Okay, thank you for explaining the situation. Now, please stop >>> baiting Nikos. >> I am not baiting Nikos.

Re: python adds an extra half space when reading from a string or list

2013-07-02 Thread Antoon Pardon
Op 02-07-13 00:12, Steven D'Aprano schreef: > On Mon, 01 Jul 2013 20:42:48 +0200, Antoon Pardon wrote: > >> How about the following comprimise. I'll get myself a second identity. >> Every respons I make to Nikos will be done with the same identity. >> Normal pyth

Re: python adds an extra half space when reading from a string or list

2013-07-02 Thread Antoon Pardon
Op 02-07-13 09:43, Ian Kelly schreef: > On Tue, Jul 2, 2013 at 12:54 AM, Antoon Pardon > wrote: >> Why about you just ignore me? >> >> Serious, a lot of people here seem to think that if someone is bothered >> by someone else, the bothered person should just igno

Re: python adds an extra half space when reading from a string or list

2013-07-02 Thread Antoon Pardon
, can take your site out the air), inconsiderate (behave annoyingly in multiple ways and despite poeple pointing it out multiple times, mostly continue in the same manner, without taking their remarks into account) and jerk (trying to spin your inconsiderate behaviour as you being the victim, misrepresenting your behaviour when it is being discussed, always "explaining" your behaviour, as if an explanation would make a difference to the annoyance you caused to others...) -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Antoon Pardon
orthy to his customers," even if all signs point to this person going to continue in the same vein. It is limiting yourself into pointing out all the trees without being allowed to call it a forest. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Antoon Pardon
Op 02-07-13 15:40, Joshua Landau schreef: > On 2 July 2013 13:01, Antoon Pardon wrote: >> Op 02-07-13 11:34, Joshua Landau schreef: >> >>> No it does not. I'd give you more of a counter but I actually have no >>> idea how you came up with that. >> Plea

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Antoon Pardon
Op 03-07-13 11:45, Chris Angelico schreef: > On Wed, Jul 3, 2013 at 7:21 PM, Antoon Pardon > wrote: >> Op 03-07-13 02:30, ru...@yahoo.com schreef: >>> If your going to point out something negative about someone >>> then do so politely. Ask yourself if you were po

Re: Python - forking an external process?

2013-07-03 Thread Antoon Pardon
python and give control to an other program. I would use an external script that would first launch the python program and then the other program. If for some reason this is a less attractive option, you can use the os.exec family. That terminates the python program will starting up an

Re: python adds an extra half space when reading from a string or list

2013-07-04 Thread Antoon Pardon
Op 04-07-13 01:40, Joshua Landau schreef: > On 3 July 2013 11:01, Antoon Pardon wrote: > >> This is not an attack of character. Level of skill/competence is >> not in general seen as a character trait. > I disagree. I'm not sure how to argue this, rather than point out

Re: python adds an extra half space when reading from a string or list

2013-07-04 Thread Antoon Pardon
Op 03-07-13 19:11, ru...@yahoo.com schreef: > On 07/03/2013 03:21 AM, Antoon Pardon wrote: >> Op 03-07-13 02:30, ru...@yahoo.com schreef: >>> If your going to point out something negative about someone >>> then do so politely. Ask yourself if you were pointing out &g

Re: How is this evaluated

2013-07-04 Thread Antoon Pardon
tituted a varible for a character literal, so I'll go with the original. l + 'o' + l if l in consonants else l for l in s Evaluate this expression: l + 'o' + l if l in consonants else l for each l in s (so for each letter that in s). l + 'o' + l if l in consonants else l if l is part of the consonants produce l + 'o' + l otherwise just produce l. Hope this helps. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading from a string or list

2013-07-08 Thread Antoon Pardon
Op 06-07-13 00:40, ru...@yahoo.com schreef: > On 07/04/2013 06:09 AM, Antoon Pardon wrote: >> Op 03-07-13 19:11, ru...@yahoo.com schreef: >>> On 07/03/2013 03:21 AM, Antoon Pardon wrote: >>>> Op 03-07-13 02:30, ru...@yahoo.com schreef: >>>>> If you

Re: Help with 'self' and 'set_usage'

2013-07-09 Thread Antoon Pardon
ting self.name = "david" self.hobby = "fishing"?? Yes you can. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: Stack Overflow moderator “animuson”

2013-07-10 Thread Antoon Pardon
Op 10-07-13 11:03, Mats Peterson schreef: > Not a troll. It's just hard to convince Python users that their beloved > language would have inferior regular expression performance to Perl. All right, you have convinced me. Now what? Why should I care? -- Antoon Pardon -- http://mail

Re: Stack Overflow moderator “animuson”

2013-07-12 Thread Antoon Pardon
Op 10-07-13 13:56, Benedict Verheyen schreef: Op Wed, 10 Jul 2013 12:12:10 +0100, schreef Joshua Landau: Do you have any non-trivial, properly benchmarked real-world examples that this affects, remembering to use full Unicode support in Perl (as Python has it by default)? Indeed, as Joshua

Re: RE Module Performance

2013-07-28 Thread Antoon Pardon
mory, shufling around data blocks or reencoding a string, that doesn't matter. If you've got a real world example where one of those things noticeably slows your program down or makes the program behave faulty then you have something that is worthy of attention. Until then you are merely harboring a pet peeve. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: FSR and unicode compliance - was Re: RE Module Performance

2013-07-28 Thread Antoon Pardon
less you start looking at things like getsizeof, which gives you implementation details that are mostly irrelevant in deciding whether the behaviour is compliant or not. sys.getsizeof('abc' * 1000 + 'z') 3026 sys.getsizeof('abc' * 1000 + '\U00010010') 12044 A bit secret. The larger a repertoire of characters is, the more bits you needs. Secret #2. You can not escape from this. And totally unimportant for deciding complyance. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: RE Module Performance

2013-07-29 Thread Antoon Pardon
nformation that is usefull for storage or transfer. But once you have decode the byte stream, you no longer need any understanding of base64 to process your information. Likewise, once you have decode the bytestream into uniocde information you don't need knowledge of utf to process unicode

Re: RE Module Performance

2013-07-29 Thread Antoon Pardon
Op 28-07-13 20:19, Joshua Landau schreef: On 28 July 2013 09:45, Antoon Pardon mailto:antoon.par...@rece.vub.ac.be>> wrote: Op 27-07-13 20:21, wxjmfa...@gmail.com <mailto:wxjmfa...@gmail.com> schreef: utf-8 or any (utf) never need and never spend their tim

Re: RE Module Performance

2013-07-29 Thread Antoon Pardon
to use the same size of memory for strings of the same length. So you pointing out examples of same length strings that don't use the same size of memory doesn't point at something that must be solved. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: RE Module Performance

2013-07-30 Thread Antoon Pardon
lly unrealistic. First of all because of the immutable nature of python strings, second because you suggest that real time usage would result in frequent conversions which is highly unlikely. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: RE Module Performance

2013-07-30 Thread Antoon Pardon
Op 30-07-13 18:13, MRAB schreef: On 30/07/2013 15:38, Antoon Pardon wrote: Op 30-07-13 16:01, wxjmfa...@gmail.com schreef: I am pretty sure that once you have typed your 127504 ascii characters, you are very happy the buffer of your editor does not waste time in reencoding the buffer as soon

Re: RE Module Performance

2013-07-30 Thread Antoon Pardon
Op 30-07-13 19:14, MRAB schreef: On 30/07/2013 17:39, Antoon Pardon wrote: Op 30-07-13 18:13, MRAB schreef: On 30/07/2013 15:38, Antoon Pardon wrote: Op 30-07-13 16:01, wxjmfa...@gmail.com schreef: I am pretty sure that once you have typed your 127504 ascii characters, you are very happy

Re: RE Module Performance

2013-07-31 Thread Antoon Pardon
Op 31-07-13 05:30, Michael Torrie schreef: > On 07/30/2013 12:19 PM, Antoon Pardon wrote: >> So? Why are you making this a point of discussion? I was not aware that >> the pro and cons of various editor buffer implemantations was relevant >> to the point I was trying to make.

Re: RE Module Performance

2013-07-31 Thread Antoon Pardon
Op 30-07-13 21:09, wxjmfa...@gmail.com schreef: > Matable, immutable, copyint + xxx, bufferint, O(n) > Yes, but conceptualy the reencoding happen sometime, somewhere. Which is a far cry from your previous claim that it happened every time you enter a char. This of course make your case harde

Re: RE Module Performance

2013-07-31 Thread Antoon Pardon
ing then your 'choice' between utf-8/16/32 implies that it will also have to reencode when it changes from utf-8 to utf-16 or utf-32. > iv) An "a" size never exceeds 4 bytes. FSR: check. > Hard job to solve/satisfy i), ii), iii) and iv) at the same time. > Is is possi

Re: email 8bit encoding

2013-07-31 Thread Antoon Pardon
message payload was set to a python (unicode) string? I am just trying out some things for my self on python 3.2 so be sure to test this out but you could try the following. msg.set_charset('utf-8') msg['Content-Transfer-Encoding'] = '8bit' -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: How can i call array_length to get the length of array object?

2012-06-25 Thread Antoon Pardon
On 06/24/12 10:48, Stefan Behnel wrote: > gmspro, 24.06.2012 10:01: > >> Why are some methods/functions named in this way in python? __len__ >> >> underscoreunderscoreNAMEunderscoreunderscore >> >> Is there any speciality of naming such methods? >> > Yes. Look up "special methods" in the do

Re: Objects in Python

2012-08-24 Thread Antoon Pardon
On 23-08-12 01:58, Ben Finney wrote: > > You haven't discovered anything about types; what you have discovered is > that Python name bindings are not variables. > > In fact, Python doesn't have variables – not as C or Java programmers > would understand the term. What it has instead are references

Re: Objects in Python

2012-08-24 Thread Antoon Pardon
On 24-08-12 09:38, Antoon Pardon wrote: > On 23-08-12 01:58, Ben Finney wrote: > >> You haven't discovered anything about types; what you have discovered is >> that Python name bindings are not variables. >> >> In fact, Python doesn't have variables

Re: A little morning puzzle

2012-09-19 Thread Antoon Pardon
mmon_keys = set([item[0] for item in common_items]) -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: while expression feature proposal

2012-10-25 Thread Antoon Pardon
t; > Keep in mind that any new syntax has to be a substantial improvement > in some sense or make something new possible. There was no new syntax > in 3.2 and very little in 3.3. If I recal correctly at one point the following was accepted: do: suite while expr: suite But it was later discarded because of lack of a champion or something like that. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: bit count or bit set && Python3

2012-10-26 Thread Antoon Pardon
On 25-10-12 16:47, Charles Hixson wrote: > In Python3 is there any good way to count the number of on bits in an > integer (after an & operation)? > Alternatively, is there any VERY light-weight implementation of a bit > set? I'd prefer to use integers, as I'm probably going to need > thousands of

3.2 can't extract tarfile produced by 2.7

2012-12-26 Thread Antoon Pardon
decode byte 0x9e in position 10: invalid start byte I have been looking around but have no idea how I have to adapt this code in order to have it process the tarfile under python3.2. The original code didn't have the coding and format keywords on the tar.open statement and after reading the documentation I thought that would make things work, but no such luck. Further reading didn't provide anything usefull -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

socket.makefile raises ValueError when mode = 'rt'

2013-01-09 Thread Antoon Pardon
This is using python 3.2. I am writing somekind of wrapper around the ftplib. So that you can work with it as if you are working with local files. The idea is that you start with making a connection like rmt = FTP(...) and then do something like the following rmtfl = rmt.open("rmtfilename", "r

Re: socket.makefile raises ValueError when mode = 'rt'

2013-01-09 Thread Antoon Pardon
Op 01/09/13 14:54, Dave Angel schreef: > On 01/09/2013 08:22 AM, Antoon Pardon wrote: >> This is using python 3.2. ... >> But the documentation states: >> socket.makefile(mode='r', buffering=None, *, encoding=None, errors=None, >> newline=None) >>

Making a logging handler that produces context.

2013-01-14 Thread Antoon Pardon
I have some in house code for which I am considering replacing the logging code with something that uses the logging module. The code is typically used as a cron job with everything higher than info logged to a file and everything higher than warning logged to stderr. However there is one thing

Re: Making a logging handler that produces context.

2013-01-14 Thread Antoon Pardon
wing away logrecords of too low a level was also done by the filter method. But if I now understand correctly logrecords of too low a level are thrown away earlier and don't even reach the handle method. Thanks for the insight. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: copy on write

2012-02-03 Thread Antoon Pardon
layed introduction was what syntax to use. But the second took a lot longer to become part of the language than the first, which seems very odd to me. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: sum() requires number, not simply __add__

2012-02-24 Thread Antoon Pardon
the foot. Yes it does! A simple example is None as a keyword to prevent assignments to it. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Don't understand SequenceMatcher from difflib

2011-06-21 Thread Antoon Pardon
I have the following code I wrote. == from difflib import SequenceMatcher import sys write = sys.stdout.write warn = sys.stderr.write def program(argv): ls1 = open(argv[1]).readlines() ls2 = open(argv[2]).readlines() matcher = SequenceMatcher(l

Re: Don't understand SequenceMatcher from difflib

2011-06-22 Thread Antoon Pardon
On Tue, Jun 21, 2011 at 03:02:57PM -0400, Terry Reedy wrote: > On 6/21/2011 9:43 AM, Antoon Pardon wrote: > > > matcher = SequenceMatcher(ls1, ls2) > ... > >What am I doing wrong? > > Read the doc, in particular, the really stupid signature of the class: > &g

Re: Guido rethinking removal of cmp from sort method

2011-03-23 Thread Antoon Pardon
er en second item in descending order. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido rethinking removal of cmp from sort method

2011-03-23 Thread Antoon Pardon
On Wed, Mar 23, 2011 at 02:59:09PM +0100, Stefan Behnel wrote: > Antoon Pardon, 23.03.2011 14:53: > >On Sun, Mar 13, 2011 at 12:59:55PM +, Steven D'Aprano wrote: > >>The removal of cmp from the sort method of lists is probably the most > >>disliked change in Pyt

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Antoon Pardon
On Wed, Mar 23, 2011 at 10:40:11AM -0600, Ian Kelly wrote: > On Wed, Mar 23, 2011 at 9:14 AM, Antoon Pardon > wrote: > > Which isn't helpfull if where you decide how they have to be sorted is > > not the place where they are actually sorted. > > > > I ha

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Antoon Pardon
On Wed, Mar 23, 2011 at 05:51:07PM +0100, Stefan Behnel wrote: > >> > >>You can use a stable sort in two steps for that. > > > >Which isn't helpfull if where you decide how they have to be sorted is > >not the place where they are actually sorted. > > > >I have a class that is a priority queue. Ele

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Antoon Pardon
On Thu, Mar 24, 2011 at 09:06:44AM -0600, Ian Kelly wrote: > On Thu, Mar 24, 2011 at 3:23 AM, Antoon Pardon > wrote: > > Sure I can do that. I can do lots of things like writing a CMP class > > that I will use as a key and where I can implement the logic for > > compar

  1   2   3   4   5   6   7   8   9   10   >