Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Steven D'Aprano
On Wed, 27 Mar 2013 22:42:18 -0700, rusi wrote: > More seriously Ive never seen anyone -- cause or person -- aided by > the use of excessively strong language. Of course not. By definition, if it helps, it wasn't *excessively* strong language. > IOW I repeat my support for Ned's request: Ad h

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread jmfauth
On 28 mar, 07:12, Ethan Furman wrote: > On 03/27/2013 08:49 PM, rusi wrote: > > > In particular "You are a liar" is as bad as "You are an idiot" > > The same statement can be made non-abusively thus: "... is not true > > because ..." > > I don't agree.  With all the posts and micro benchmarks and

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Ian Foote
On 28/03/13 09:03, jmfauth wrote: The problem is elsewhere. Nobody understand the examples I gave on this list, because nobody understand Unicode. These examples are not random examples, they are well thought. If you were understanding the coding of the characters, Unicode and what this flexible

Re: Altering 2 statements from Python 2.6 => 3.2

2013-03-28 Thread Νίκος Γκρ33κ
I'am just tryign to print the date with proper greek letters as it uses to work with Python v2.6 date gets calculated here: date = ( datetime.utcnow() + timedelta(hours=2) ).strftime( '%y-%m-%d %H:%M:%S' ) I'am not sure but i believe that the decode must be taken out in python 3.x because

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Oscar Benjamin
On 28 March 2013 09:03, jmfauth wrote: > > The problem is elsewhere. Nobody understand the examples > I gave on this list, because nobody understand Unicode. > These examples are not random examples, they are well > thought. There are many people here and among the Python devs who understand unic

Re: Cannot run a single MySQLdb execute....

2013-03-28 Thread Νίκος Γκρ33κ
Can someone else esxcept Chris help me please? I'm strugling with this and cannot see whats wrong. -- http://mail.python.org/mailman/listinfo/python-list

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Chris Angelico
On Thu, Mar 28, 2013 at 4:20 PM, Steven D'Aprano wrote: > On Wed, 27 Mar 2013 20:49:20 -0700, rusi wrote: > >> In particular "You are a liar" is as bad as "You are an idiot" The same >> statement can be made non-abusively thus: "... is not true because ..." > > I accept that criticism, even if I d

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Chris Angelico
On Thu, Mar 28, 2013 at 8:03 PM, jmfauth wrote: > Example of a good Unicode understanding. > If you wish 1) to preserve memory, 2) to cover the whole range > of Unicode, 3) to keep maximum performance while preserving the > good work Unicode.org as done (normalization, sorting), there > is only on

Re: Help me pick an API design (OO vs functional)

2013-03-28 Thread Michael Herrmann
On Wednesday, March 27, 2013 2:56:55 PM UTC+1, Mitya Sirenef wrote: > ... > > I think alt-tab has to be special in any case. Regular alt-tab would act > like the GOTO statement. As a programmer looking at a script you have no > idea where you just alt-tabbed to without possibly looking through > d

Re: Help me pick an API design (OO vs functional)

2013-03-28 Thread Michael Herrmann
On Wednesday, March 27, 2013 5:45:49 PM UTC+1, Ethan Furman wrote: > On 03/27/2013 02:34 AM, Michael Herrmann wrote: > > Design #2: > > notepad_1 = start("Notepad") > > notepad_2 = start("Notepad") > > switch_to(notepad_1) > > write("Hello World!") > > p

Curl and python httplib?

2013-03-28 Thread ??????PHP
Guys, I take a project that need send request to Hadoop by curl. But now, the curl and pycurl can't satisfy my project. So i need use the powerful httplib. But failed. my curl request: curl -i -X PUT "http://localhost:50070/webhdfs/v1/levi/7?op=CREATE"; my return: HTTP/1.1 307 TEMPORARY_REDIR

PyCon Australia 2013 Early Bird registration and Accommodation deals now available!

2013-03-28 Thread Chris Neugebauer
tl;dr: PyCon Australia early bird registrations are now open! Find out more at http://2013.pycon-au.org/register/prices, including details of our accommodation programme. ** PyCon Australia is excited to announce that early bird conference registrations are now available for our 2013 conference,

Need admin right to install wxPython2.8.win64-unicode-2.8.12.1-py27.exe in Win7

2013-03-28 Thread xiaojun.zhong
Hi, When I using standard user account to install wxPython2.8-win64-unicode-2.8.12.1-py27.exe in Win7, it prompt me must be logged in as an admin when installing. Is there any solution to install wxPython without admin right? Thanks, Scott This email was sent to you by Thomson Reuters,

Re: Help me pick an API design (OO vs functional)

2013-03-28 Thread Michael Herrmann
On Thursday, March 28, 2013 1:42:35 AM UTC+1, Steven D'Aprano wrote: > On Wed, 27 Mar 2013 02:34:09 -0700, Michael Herrmann wrote: > > > On Tuesday, March 26, 2013 11:37:23 PM UTC+1, Steven D'Aprano wrote: > >> > >> Global *variables* are bad, not global functions. You have one global > >> variab

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Neil Hodgson
Ian Foote: Specifically, indexing a variable-length encoding like utf-8 is not as efficient as indexing a fixed-length encoding. Many common string operations do not require indexing by character which reduces the impact of this inefficiency. UTF-8 seems like a reasonable choice for an in

Differentiation in Python

2013-03-28 Thread zingbagbamark
How do I differentiate(first order and 2nd order) the following equations in python. I want to differentiate C wrt Q. C = (Q**3)-15*(Q**2)+ 93*Q + 100 -- http://mail.python.org/mailman/listinfo/python-list

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Mark Lawrence
On 28/03/2013 03:18, Ethan Furman wrote: I wouldn't call it unproductive -- a half-dozen amusing posts followed because of Mark's initial post, and they were a great relief from the tedium and (dare I say it?) idiocy of jmf's posts. -- ~Ethan~ Thanks for those words. They're a tonic as I've

Re: Differentiation in Python

2013-03-28 Thread Steven D'Aprano
On Thu, 28 Mar 2013 05:17:36 -0700, zingbagbamark wrote: > How do I differentiate(first order and 2nd order) the following > equations in python. I want to differentiate C wrt Q. > > C = (Q**3)-15*(Q**2)+ 93*Q + 100 For such a simple case, you don't do it with Python, you do it with maths, and

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Steven D'Aprano
On Thu, 28 Mar 2013 23:11:55 +1100, Neil Hodgson wrote: > Ian Foote: > >> Specifically, indexing a variable-length encoding like utf-8 is not as >> efficient as indexing a fixed-length encoding. > > Many common string operations do not require indexing by character > which reduces the impact

after discussing about the line

2013-03-28 Thread betatwelve
Hiya all. it might be appropriate to imagine the remote surveillance of the color using up-to-date methodologies when studying the line with the color remote monitoring; We may also notice that, everybody should applicate this type of guidelines The hairline on the right side of the face creat

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread jmfauth
On 28 mar, 11:30, Chris Angelico wrote: > On Thu, Mar 28, 2013 at 8:03 PM, jmfauth wrote: - > You really REALLY need to sort out in your head the difference between > correctness and performance. I still haven't seen one single piece of > evidence from you that Python 3.3 fails on any point

Re: Help with zip in a Python exercise

2013-03-28 Thread Anssi Saari
lug...@elpasotel.net writes: > I've been working through a Python tutorial online and one of the exercises > uses the zip command. The only problem is that the command doesn't work. > I've read through the man page for zip and it looks like what I'm attempting > should work, but it doesn't. >

Embed vtk window in a QTabWidget

2013-03-28 Thread Kene Meniru
Hi: I know this may not be the right place to post this but I found some other PyQt questions and I am desperate. My app is the Window class object below and I am trying to embed a QVTKRenderWindowInteractor class called ConeWindow in its QTabWidget. First of all running ConeWindow gives out

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread jmfauth
On 28 mar, 14:01, Steven D'Aprano wrote: > On Thu, 28 Mar 2013 23:11:55 +1100, Neil Hodgson wrote: > > Ian Foote: > > > > One benefit of > > UTF-8 over Python's flexible representation is that it is, on average, > > more compact over a wide set of samples. > > Sure. And over a different set of sam

No errors displayed but i blank scren nstead.

2013-03-28 Thread Νίκος Γκρ33κ
Fianlly my cgi .py script doesnt produce any more errors, i think i ahve correct them but it present a blank screen http://superhost.gr Any idea why? What should i check? -- http://mail.python.org/mailman/listinfo/python-list

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 1:12 AM, jmfauth wrote: > This flexible string representation is so absurd that not only > "it" does not know you can not write Western European Languages > with latin-1, "it" penalizes you by just attempting to optimize > latin-1. Shown in my multiple examples. PEP393 str

Help printing the integers of a longer number

2013-03-28 Thread khaosyt
I want to print the individual numbers of a large number using division and modulus division. For example: Enter a positive integer: 54321 5 4 3 2 1 -- http://mail.python.org/mailman/listinfo/python-list

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Miki Tebeka
> Fianlly my cgi .py script doesnt produce any more errors, i think i ahve > correct them but it present a blank screen > Any idea why? Please post the code to the script, otherwise we can't help you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help printing the integers of a longer number

2013-03-28 Thread Joel Goldstick
On Thu, Mar 28, 2013 at 10:39 AM, wrote: > I want to print the individual numbers of a large number using division > and modulus division. > > For example: > > Enter a positive integer: 54321 > 5 > 4 > 3 > 2 > 1 > > This looks familiar. Make the integer a string and use a for loop to iterate ove

Re: Help printing the integers of a longer number

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 1:39 AM, wrote: > I want to print the individual numbers of a large number using division and > modulus division. > > For example: > > Enter a positive integer: 54321 > 5 > 4 > 3 > 2 > 1 Python has two operators that can help here: // for integer division - returns the

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 28 Μαρτίου 2013 4:42:59 μ.μ. UTC+2, ο χρήστης Miki Tebeka έγραψε: > Please post the code to the script, otherwise we can't help you. I wanted to make my website running Python 3 which is more new and bette:) i treid to execute metrites.py via my jailed shell, please take a look if i'a

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread MRAB
On 28/03/2013 12:11, Neil Hodgson wrote: Ian Foote: Specifically, indexing a variable-length encoding like utf-8 is not as efficient as indexing a fixed-length encoding. Many common string operations do not require indexing by character which reduces the impact of this inefficiency. UTF-8 see

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 28 Μαρτίου 2013 4:42:59 μ.μ. UTC+2, ο χρήστης Miki Tebeka έγραψε: > > Fianlly my cgi .py script doesnt produce any more errors, i think i ahve > > correct them but it present a blank screen > > > Any idea why? > > Please post the code to the script, otherwise we can't help you. who e

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 1:46 AM, Νίκος Γκρ33κ wrote: > Oh look, an exception traceback! In all this time of using Python, Nikos, have you learned how to read these? Very courteous of it to provide. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot run a single MySQLdb execute....

2013-03-28 Thread David M Chess
Νίκος Γκρ33κ : >> What paramstyle are you using? > >Yes it is Chris, but i'am not sure what exactly are you asking me. >Please if you cna pout it even simper for me, thank you. For instance: >>> import MySQLdb >>> MySQLdb.paramstyle 'format' FWIW and HTH, DC -- http://mail.python.org/mailman

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Νίκος Γκρ33κ
this is correct when it runs from a browser thats not the issue here othwerise it would prodice an error. the question is why the blank screen... somehting with param style perhaps? -- http://mail.python.org/mailman/listinfo/python-list

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 1:51 AM, MRAB wrote: > On 28/03/2013 12:11, Neil Hodgson wrote: >> >> Ian Foote: >> >>> Specifically, indexing a variable-length encoding like utf-8 is not >>> as efficient as indexing a fixed-length encoding. >> >> >> Many common string operations do not require indexing b

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread jmfauth
On 28 mar, 15:38, Chris Angelico wrote: > On Fri, Mar 29, 2013 at 1:12 AM, jmfauth wrote: > > This flexible string representation is so absurd that not only > > "it" does not know you can not write Western European Languages > > with latin-1, "it" penalizes you by just attempting to optimize > >

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Νίκος Γκρ33κ
PLEASE GIVE ME A CLUE ABOUT THIS SITUATION. EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE NOT EVEN AN INTERNAL SERVER ERROR. ni...@superhost.gr [~/www/cgi-bin]# /usr/bin/python3 metrites.py says its ok. -- http://mail.python.org/mailman/listinfo/python-list

list comprehension misbehaving

2013-03-28 Thread Wolfgang Maier
Dear all, with a=list(range(1,11)) why (in Python 2.7 and 3.3) is this explicit for loop working: for i in a[:-1]: a.pop() and a giving: [1, 2, 3, 4, 5, 6, 7, 8, 9] [1, 2, 3, 4, 5, 6, 7, 8] [1, 2, 3, 4, 5, 6, 7] [1, 2, 3, 4, 5, 6] [1, 2, 3, 4, 5] [1, 2, 3, 4] [1, 2, 3] [1, 2] [1] but the equ

Replacing old data with new data using python

2013-03-28 Thread inkprs
I have 2 tables TBL1 and TBL2. TBL1 has 2 columns id, nSql. TBL2 has 3 columns date, custId, userId. I have 17 rows in TBL1 with id 1 to 17. Each nSql has a SQL query in it. For example nSql for id == 1 is: "select date, pId as custId, tId as userId from TBL3" id == 2 is: "select date, qId as cu

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 2:14 AM, jmfauth wrote: > As long as you are attempting to devide a set of characters in > chunks and try to handle them seperately, it will never work. Okay. Let's look at integers. To properly represent the Python 3 'int' type (or the Python 2 'long'), we need to be able

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 2:20 AM, Νίκος Γκρ33κ wrote: > PLEASE GIVE ME A CLUE ABOUT THIS SITUATION. > > EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE NOT > EVEN AN INTERNAL SERVER ERROR. Quit shouting. You are asking for free help from volunteers. At the moment, you're a

Re: list comprehension misbehaving

2013-03-28 Thread Tim Chase
On 2013-03-28 15:25, Wolfgang Maier wrote: > Dear all, with > a=list(range(1,11)) > > why (in Python 2.7 and 3.3) is this explicit for loop working: > for i in a[:-1]: > a.pop() and a As you discover: > Especially, since these two things *do* work as expected: > [a.pop() and a[:] for i in a[

Re: list comprehension misbehaving

2013-03-28 Thread Peter Otten
Wolfgang Maier wrote: > Dear all, with > a=list(range(1,11)) > > why (in Python 2.7 and 3.3) is this explicit for loop working: > for i in a[:-1]: > a.pop() and a > > giving: > [1, 2, 3, 4, 5, 6, 7, 8, 9] > [1, 2, 3, 4, 5, 6, 7, 8] > [1, 2, 3, 4, 5, 6, 7] > [1, 2, 3, 4, 5, 6] > [1, 2, 3, 4,

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread jmfauth
On 28 mar, 16:14, jmfauth wrote: > On 28 mar, 15:38, Chris Angelico wrote: > > > > > > > > > > > On Fri, Mar 29, 2013 at 1:12 AM, jmfauth wrote: > > > This flexible string representation is so absurd that not only > > > "it" does not know you can not write Western European Languages > > > with l

Re: list comprehension misbehaving

2013-03-28 Thread Wolfgang Maier
Tim Chase tim.thechases.com> writes: > it's because you're taking a snapshot copy of "a" in the middle of > the loop. In your first example, if you change it to > > results = [] > for i in a[:-1]: > results.append(a.pop() and a) > print results > > you get the same thing as your list

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 28 Μαρτίου 2013 5:25:26 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > On Fri, Mar 29, 2013 at 2:20 AM, Νίκος Γκρ33κ wrote: > > > PLEASE GIVE ME A CLUE ABOUT THIS SITUATION. > > > > > > EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE NOT > > EVEN AN INTERNAL S

Re: list comprehension misbehaving

2013-03-28 Thread duncan smith
On 28/03/13 15:25, Wolfgang Maier wrote: Dear all, with a=list(range(1,11)) why (in Python 2.7 and 3.3) is this explicit for loop working: for i in a[:-1]: a.pop() and a giving: [1, 2, 3, 4, 5, 6, 7, 8, 9] [1, 2, 3, 4, 5, 6, 7, 8] [1, 2, 3, 4, 5, 6, 7] [1, 2, 3, 4, 5, 6] [1, 2, 3, 4, 5] [1

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 2:51 AM, Νίκος Γκρ33κ wrote: > Τη Πέμπτη, 28 Μαρτίου 2013 5:25:26 μ.μ. UTC+2, ο χρήστης Chris Angelico > έγραψε: >> On Fri, Mar 29, 2013 at 2:20 AM, Νίκος Γκρ33κ wrote: >> >> > PLEASE GIVE ME A CLUE ABOUT THIS SITUATION. >> >> > >> >> > EVEN JAILED SHELL ACCESS SAYS ITS O

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Ian Kelly
On Thu, Mar 28, 2013 at 7:01 AM, Steven D'Aprano wrote: > Any string method that takes a starting offset requires the method to > walk the string byte-by-byte. I've even seen languages put responsibility > for dealing with that onto the programmer: the "start offset" is given in > *bytes*, not cha

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 28 Μαρτίου 2013 4:42:59 μ.μ. UTC+2, ο χρήστης Miki Tebeka έγραψε: > > Fianlly my cgi .py script doesnt produce any more errors, i think i ahve > > correct them but it present a blank screen > > > Any idea why? > > Please post the code to the script, otherwise we can't help you. Can y

IV ECCOMAS Thematic Conference VipIMAGE 2013: SUBMISSION REMINDER

2013-03-28 Thread tava...@fe.up.pt
Dear Colleague, We would like to call your attention that the deadline for abstracts submission for the International Conference VipIMAGE 2013 - IV ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING (www.fe.up.pt/~vipimage) to be held October 14-16, 2013, in Melia

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Terry Reedy
On 3/28/2013 10:38 AM, Chris Angelico wrote: PEP393 strings have two optimizations, or kinda three: 1a) ASCII-only strings 1b) Latin1-only strings 2) BMP-only strings 3) Everything else Options 1a and 1b are almost identical - I'm not sure what the detail is, but there's something flagging tho

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 28 Μαρτίου 2013 5:59:55 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > On Fri, Mar 29, 2013 at 2:51 AM, Νίκος Γκρ33κ wrote: > > > Τη Πέμπτη, 28 Μαρτίου 2013 5:25:26 μ.μ. UTC+2, ο χρήστης Chris Angelico > > έγραψε: > > >> On Fri, Mar 29, 2013 at 2:20 AM, Νίκος Γκρ33κ > >> wrote: >

Re: Replacing old data with new data using python

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 2:23 AM, wrote: > I think we can use it in 'if else' statement. something pseudocode like: if > there is data in TBL2 for date_sub(curdate(), interval 1 day), remove the > database data and insert new data. else insert new data into database. > > How can I do it? Can y

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Ian Kelly
On Thu, Mar 28, 2013 at 8:38 AM, Chris Angelico wrote: > PEP393 strings have two optimizations, or kinda three: > > 1a) ASCII-only strings > 1b) Latin1-only strings > 2) BMP-only strings > 3) Everything else > > Options 1a and 1b are almost identical - I'm not sure what the detail > is, but there'

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 3:01 AM, Terry Reedy wrote: > On 3/28/2013 10:38 AM, Chris Angelico wrote: > >> PEP393 strings have two optimizations, or kinda three: >> >> 1a) ASCII-only strings >> 1b) Latin1-only strings >> 2) BMP-only strings >> 3) Everything else >> >> Options 1a and 1b are almost ide

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Ian Kelly
On Thu, Mar 28, 2013 at 7:34 AM, jmfauth wrote: > The flexible string representation takes the problem from the > other side, it attempts to work with the characters by using > their representations and it (can only) fails... This is false. As I've pointed out to you before, the FSR does not div

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread jmfauth
Chris, Your problem with int/long, the start of this thread, is very intersting. This is not a demonstration, a proof, rather an illustration. Assume you have a set of integers {0...9} and an operator, let say, the addition. Idea. Just devide this set in two chunks, {0...4} and {5...9} and work

Re: Help printing the integers of a longer number

2013-03-28 Thread Jussi Piitulainen
khao...@gmail.com writes: > I want to print the individual numbers of a large number using > division and modulus division. > > For example: > > Enter a positive integer: 54321 > 5 > 4 > 3 > 2 > 1 Those numbers are called the digits of the large number. With divmod(54321, 10) you get both the

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 3:55 AM, jmfauth wrote: > Assume you have a set of integers {0...9} and an operator, > let say, the addition. > > Idea. > Just devide this set in two chunks, {0...4} and {5...9} > and work hardly to optimize the addition of 2 operands in > the sets {0...4}. > > The problems

Re: Help printing the integers of a longer number

2013-03-28 Thread Jussi Piitulainen
Jussi Piitulainen writes: > khao...@gmail.com writes: > > > I want to print the individual numbers of a large number using > > division and modulus division. > > > > For example: > > > > Enter a positive integer: 54321 > > 5 > > 4 > > 3 > > 2 > > 1 > > Those numbers are called the digits of th

Re: Help printing the integers of a longer number

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 4:03 AM, Jussi Piitulainen wrote: > def print_digits(num): >left, last = divmod(num, 10) >if left < 0: print the digits of left >print(last) > > How do you print the digits of left? With print_digits. Why does it > work? Because you only call print_digits again

Re: Help printing the integers of a longer number

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 4:11 AM, Jussi Piitulainen wrote: > Jussi Piitulainen writes: > >> khao...@gmail.com writes: >> >> > I want to print the individual numbers of a large number using >> > division and modulus division. >> > >> > For example: >> > >> > Enter a positive integer: 54321 >> > 5 >>

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Walter Hurry
On Fri, 29 Mar 2013 02:25:26 +1100, Chris Angelico wrote: > On Fri, Mar 29, 2013 at 2:20 AM, Νίκος Γκρ33κ > wrote: >> PLEASE GIVE ME A CLUE ABOUT THIS SITUATION. >> >> EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE >> NOT EVEN AN INTERNAL SERVER ERROR. > > Quit shouting.

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Νίκος Γκρ33κ
Like you werent of any help -- http://mail.python.org/mailman/listinfo/python-list

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread jmfauth
On 28 mar, 17:33, Ian Kelly wrote: > On Thu, Mar 28, 2013 at 7:34 AM, jmfauth wrote: > > The flexible string representation takes the problem from the > > other side, it attempts to work with the characters by using > > their representations and it (can only) fails... > > This is false.  As I've

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 4:48 AM, jmfauth wrote: > If Python had imlemented Unicode correctly, there would > be no difference in using an "a", "é", "€" or any character, > what the narrow builds did. I'm not following your grammar perfectly here, but if Python were implementing Unicode correctly,

Re: Differentiation in Python

2013-03-28 Thread David Robinow
On Thu, Mar 28, 2013 at 8:17 AM, wrote: > How do I differentiate(first order and 2nd order) the following equations in > python. I want to differentiate C wrt Q. > > C = (Q**3)-15*(Q**2)+ 93*Q + 100 """ Years ago, when I actually worked for a living, I would have done something like this: """

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Νίκος Γκρ33κ
Will someone help me out here please? -- http://mail.python.org/mailman/listinfo/python-list

Re: Small program ideas

2013-03-28 Thread PMT
Em sábado, 16 de fevereiro de 2013 03h22min41s UTC, eli m escreveu: > Any small program ideas? I would prefer to stick to command line ones. Thanks. What about this one? Do you know how to do the elevator simulation? -- http://mail.python.org/mailman/listinfo/python-list

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Mark Lawrence
On 28/03/2013 18:37, Νίκος Γκρ33κ wrote: Will someone help me out here please? I suggest you take a course in diplomacy, but not one given by me :) -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence -- http://mail.python.org/mailm

Re: No errors displayed but i blank scren nstead.

2013-03-28 Thread Νίκος Γκρ33κ
Well i dont like people taking to me this way espceially when iam tryign 2 days for something and thats changing from 2.6 => 3.2.3 I follow advice as long as i can understand whats being said to me. So if someone wants to help by asking me to try things please do. -- http://mail.python.org/mail

Lazy evaluated

2013-03-28 Thread Habibutsu
For example, we have following code: 01|def foo(): 02|return 1 03| 04|value = foo() 05| 06|if value == 1: 07|print value,"- equal 1" 08| 09|if isinstance(value, int): 10|print value,"- is int" 11|else: 12|print value,"- is not int" Task is to

Re: Cannot run a single MySQLdb execute....

2013-03-28 Thread Νίκος Γκρ33κ
Τη Πέμπτη, 28 Μαρτίου 2013 4:51:16 μ.μ. UTC+2, ο χρήστης David M Chess έγραψε: > Νίκος Γκρ33κ > : > > > > >> What paramstyle are you using? > > > > > >Yes it is Chris, but i'am not sure what exactly are you asking me. > > >Please if you cna pout it even simper for me, thank you. > > > > F

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread rurpy
On 03/28/2013 01:48 AM, Steven D'Aprano wrote: > On Wed, 27 Mar 2013 22:42:18 -0700, rusi wrote: >> More seriously Ive never seen anyone -- cause or person -- aided by >> the use of excessively strong language. > > Of course not. By definition, if it helps, it wasn't *excessively* strong > langua

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Ned Deily
In article , Chris Angelico wrote: > I'd rather this list have some vinegar than it devolve into > uselessness. Or, worse, if there's a hard-and-fast rule about > courtesy, devolve into aspartame... everyone's courteous in words but > hates each other underneath. Or am I taking the analogy too f

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread jmfauth
On 28 mar, 18:55, Chris Angelico wrote: > On Fri, Mar 29, 2013 at 4:48 AM, jmfauth wrote: > > If Python had imlemented Unicode correctly, there would > > be no difference in using an "a", "é", "€" or any character, > > what the narrow builds did. > > I'm not following your grammar perfectly here,

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Benjamin Kaplan
On Thu, Mar 28, 2013 at 10:48 AM, jmfauth wrote: > On 28 mar, 17:33, Ian Kelly wrote: >> On Thu, Mar 28, 2013 at 7:34 AM, jmfauth wrote: >> > The flexible string representation takes the problem from the >> > other side, it attempts to work with the characters by using >> > their representations

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Ethan Furman
On 03/28/2013 12:54 PM, ru...@yahoo.com wrote: On 03/28/2013 01:48 AM, Steven D'Aprano wrote: On Wed, 27 Mar 2013 22:42:18 -0700, rusi wrote: For someone who delights in pointing out the logical errors of others you are often remarkably sloppy in your own logic. Of course language can be both

Re: Cannot run a single MySQLdb execute....

2013-03-28 Thread Alan Meyer
On 3/27/2013 11:50 PM, Νίκος Γκρ33κ wrote: I'am about to go nuts with python 3.2.3 Do you see somehtign wrong with the following statement? cur.execute( '''SELECT hits FROM counters WHERE url = ?''', (page,) ) data = cur.fetchone() because as you can see by visiting my webpage at http://superh

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread jmfauth
On 28 mar, 21:29, Benjamin Kaplan wrote: > On Thu, Mar 28, 2013 at 10:48 AM, jmfauth wrote: > > On 28 mar, 17:33, Ian Kelly wrote: > >> On Thu, Mar 28, 2013 at 7:34 AM, jmfauth wrote: > >> > The flexible string representation takes the problem from the > >> > other side, it attempts to work wit

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread jmfauth
On 28 mar, 22:11, jmfauth wrote: > On 28 mar, 21:29, Benjamin Kaplan wrote: > > > > > > > > > > > On Thu, Mar 28, 2013 at 10:48 AM, jmfauth wrote: > > > On 28 mar, 17:33, Ian Kelly wrote: > > >> On Thu, Mar 28, 2013 at 7:34 AM, jmfauth wrote: > > >> > The flexible string representation takes t

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 7:26 AM, jmfauth wrote: > The wide build (I never used) is in my mind as correct as > the narrow build. It "just" covers a different range in unicode > (the whole range). Actually it does; it covers all of the Unicode range, by using (effectively) UTF-16. Characters that c

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread MRAB
On 28/03/2013 21:11, jmfauth wrote: On 28 mar, 21:29, Benjamin Kaplan wrote: On Thu, Mar 28, 2013 at 10:48 AM, jmfauth wrote: > On 28 mar, 17:33, Ian Kelly wrote: >> On Thu, Mar 28, 2013 at 7:34 AM, jmfauth wrote: >> > The flexible string representation takes the problem from the >> > other

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Benjamin Kaplan
On Thu, Mar 28, 2013 at 2:11 PM, jmfauth wrote: > On 28 mar, 21:29, Benjamin Kaplan wrote: >> On Thu, Mar 28, 2013 at 10:48 AM, jmfauth wrote: >> > On 28 mar, 17:33, Ian Kelly wrote: >> >> On Thu, Mar 28, 2013 at 7:34 AM, jmfauth wrote: >> >> > The flexible string representation takes the prob

Re: Sudoku

2013-03-28 Thread Eric Parry
On Thursday, March 28, 2013 3:06:02 PM UTC+10:30, Dave Angel wrote: > On 03/27/2013 11:00 PM, Eric Parry wrote: > > > On Wednesday, March 27, 2013 6:28:01 PM UTC+10:30, Ulrich Eckhardt wrote: > > >> > > > http://wiki.python.org/moin/GoogleGroupsPython > > > > > > > Thank you for your e

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread 88888 Dihedral
Chris Angelico於 2013年3月28日星期四UTC+8上午11時40分17秒寫道: > On Thu, Mar 28, 2013 at 2:18 PM, Ethan Furman wrote: > > > Has anybody else thought that [jmf's] last few responses are starting to > > sound > > > bot'ish? > > > > Yes, I did wonder. It's like he and Dihedral have been trading > > accounts

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Terry Reedy
On 3/28/2013 4:26 PM, jmfauth wrote: Please provide references for your assertions. I have read the unicode standard, parts more than once, and your assertions contradict my memory. Unicode does not stipulate, one has to cover the whole range. I believe it does. As I remember, the recognize

Re: Sudoku

2013-03-28 Thread Dave Angel
On 03/28/2013 06:11 PM, Eric Parry wrote: On Thursday, March 28, 2013 3:06:02 PM UTC+10:30, Dave Angel wrote: Are you familiar with recursion? Notice the last line in the function r() calls the function r() inside a for loop. So when r() returns, you're back inside the next level up o

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 10:53 AM, Dennis Lee Bieber wrote: > On Wed, 27 Mar 2013 23:12:21 -0700, Ethan Furman > declaimed the following in gmane.comp.python.general: > >> >> At some point we have to stop being gentle / polite / politically correct >> and call a shovel a shovel... er, spade. > >

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Mark Lawrence
On 28/03/2013 23:53, Dennis Lee Bieber wrote: On Wed, 27 Mar 2013 23:12:21 -0700, Ethan Furman declaimed the following in gmane.comp.python.general: At some point we have to stop being gentle / polite / politically correct and call a shovel a shovel... er, spade. Call it an Instrum

Surrogate pairs in new flexible string representation [was Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]]

2013-03-28 Thread Steven D'Aprano
On Thu, 28 Mar 2013 10:11:59 -0600, Ian Kelly wrote: > On Thu, Mar 28, 2013 at 8:38 AM, Chris Angelico > wrote: >> PEP393 strings have two optimizations, or kinda three: >> >> 1a) ASCII-only strings >> 1b) Latin1-only strings >> 2) BMP-only strings >> 3) Everything else >> >> Options 1a and 1b ar

Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]

2013-03-28 Thread Steven D'Aprano
On Thu, 28 Mar 2013 12:54:20 -0700, rurpy wrote: > Even if you personally would prefer someone to respond by calling you a > liar, your personal preferences do not form a basis for desirable > posting behavior here. Whereas yours apparently are. Thanks for the feedback, I'll take it under advise

Re: Surrogate pairs in new flexible string representation [was Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]]

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 11:39 AM, Steven D'Aprano wrote: > ASCII and Latin-1 strings obviously do not have them. Nor do BMP-only > strings. It's only strings in the SMPs that could need surrogate pairs, > and they don't need them in Python's implementation since it's a full 32- > bit implementatio

Re: Surrogate pairs in new flexible string representation [was Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]]

2013-03-28 Thread Mark Lawrence
On 29/03/2013 00:54, Chris Angelico wrote: Minor nitpick, btw: (in which cast wstr_length differs form length) Should be "in which case" and "from". Who has the power to correct typos in PEPs? ChrisA Sneak it in here? http://bugs.python.org/issue13604 -- If you're using GoogleCrap™ please

Re: Surrogate pairs in new flexible string representation [was Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]]

2013-03-28 Thread Chris Angelico
On Fri, Mar 29, 2013 at 12:03 PM, Mark Lawrence wrote: > On 29/03/2013 00:54, Chris Angelico wrote: >> Minor nitpick, btw: >>> >>> (in which cast wstr_length differs form length) >> >> Should be "in which case" and "from". Who has the power to correct >> typos in PEPs? > > Sneak it in here? http:/

Re: Surrogate pairs in new flexible string representation [was Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]]

2013-03-28 Thread MRAB
On 29/03/2013 00:54, Chris Angelico wrote: On Fri, Mar 29, 2013 at 11:39 AM, Steven D'Aprano wrote: ASCII and Latin-1 strings obviously do not have them. Nor do BMP-only strings. It's only strings in the SMPs that could need surrogate pairs, and they don't need them in Python's implementation s

Re: Surrogate pairs in new flexible string representation [was Re: flaming vs accuracy [was Re: Performance of int/long in Python 3]]

2013-03-28 Thread Steven D'Aprano
On Fri, 29 Mar 2013 11:54:41 +1100, Chris Angelico wrote: > On Fri, Mar 29, 2013 at 11:39 AM, Steven D'Aprano > wrote: >> ASCII and Latin-1 strings obviously do not have them. Nor do BMP-only >> strings. It's only strings in the SMPs that could need surrogate pairs, >> and they don't need them in

  1   2   >