help with explaining how to split a list of tuples into parts

2013-07-12 Thread peter
Hi List, I am new to Python and wondering if there is a better python way to do something. As a learning exercise I decided to create a python bash script to wrap around the Python Crypt library (Version 2.7). My attempt is located here - https://gist.github.com/pjfoley/5989653 I am trying to

Re: How do I get the OS System Font Directory(Cross-Platform) in python?

2013-07-12 Thread Metallicow
On Saturday, July 13, 2013 12:36:45 AM UTC-5, Tim Roberts wrote: > Really? Because Windows is the ONLY one of the major operating systems > > that actually has a dedicated system fonts directory. Linux doesn't even > > have a dedicated windowing system. So... Is it expected to install duplicat

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Νικόλας
Στις 13/7/2013 9:22 πμ, ο/η Chris Angelico έγραψε: On Sat, Jul 13, 2013 at 4:07 PM, ��� wrote: But it works for me, How can it be impossible and worked for me at the same time? If I roll ten six-sided dice, will they total 35? Maybe. Maybe they'll be close. But it's impossible to come up

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Chris Angelico
On Sat, Jul 13, 2013 at 4:07 PM, Νικόλας wrote: > But it works for me, How can it be impossible and worked for me at the same > time? If I roll ten six-sided dice, will they total 35? Maybe. Maybe they'll be close. But it's impossible to come up with a table for rolling those dice on that will gu

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Νικόλας
Στις 13/7/2013 8:53 πμ, ο/η Chris Angelico έγραψε: On Sat, Jul 13, 2013 at 3:48 PM, ��� wrote: 13/7/2013 2:04 ��, �/� Dennis Lee Bieber ��: On Sat, 13 Jul 2013 02:47:38 +1000, Chris Angelico declaimed the following: Oh, and just for laughs, I tried a few of my recent mobile I

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Chris Angelico
On Sat, Jul 13, 2013 at 3:48 PM, Νικόλας wrote: > Στις 13/7/2013 2:04 πμ, ο/η Dennis Lee Bieber έγραψε: >> >> On Sat, 13 Jul 2013 02:47:38 +1000, Chris Angelico >> declaimed the following: >> >>> >>> Oh, and just for laughs, I tried a few of my recent mobile IP >>> addresses in the GeoIP lookup.

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Νικόλας
Στις 13/7/2013 2:04 πμ, ο/η Dennis Lee Bieber έγραψε: On Sat, 13 Jul 2013 02:47:38 +1000, Chris Angelico declaimed the following: Oh, and just for laughs, I tried a few of my recent mobile IP addresses in the GeoIP lookup. All of them quoted Melbourne someplace, some in the CBD and some out i

Re: How do I get the OS System Font Directory(Cross-Platform) in python?

2013-07-12 Thread Tim Roberts
Metallicow wrote: > >If the OS doesn't *have* a dedicated system fonts dir that is accessable >by the user, then I am not that much interested in dealing with it. Really? Because Windows is the ONLY one of the major operating systems that actually has a dedicated system fonts directory. Linux

Re: RE Module Performance

2013-07-12 Thread Steven D'Aprano
On Fri, 12 Jul 2013 13:58:29 -0400, Devyn Collier Johnson wrote: > I plan to spend some time optimizing the re.py module for Unix systems. > I would love to amp up my programs that use that module. In my experience, often the best way to optimize a regex is to not use it at all. [steve@ando ~]$

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Νικόλας
Στις 13/7/2013 1:07 πμ, ο/η MRAB έγραψε: Have you considered that your ISP might be in the same city as you? According to geoiptool, my ISP is near Leeds, UK, but the important point is that _I'm not_. My ISP is in Athens and i live in Thessaloníki and it returned back Thessaloníki not Athe

Re: hex dump w/ or w/out utf-8 chars

2013-07-12 Thread Steven D'Aprano
On Fri, 12 Jul 2013 23:01:47 +0100, Joshua Landau wrote: > Isn't a superscript "c" the symbol for radians? Only in the sense that a superscript "o" is the symbol for degrees. Semantically, both degree-sign and radian-sign are different "things" than merely an o or c in superscript. Neverthele

Re: hex dump w/ or w/out utf-8 chars

2013-07-12 Thread Tim Roberts
Joshua Landau wrote: > >Isn't a superscript "c" the symbol for radians? That's very rarely used. More common is "rad". The problem with a superscript "c" is that it looks too much like a degree symbol. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mai

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Chris Angelico
On Sat, Jul 13, 2013 at 9:04 AM, Dennis Lee Bieber wrote: > On Sat, 13 Jul 2013 02:47:38 +1000, Chris Angelico > declaimed the following: > >> >>Oh, and just for laughs, I tried a few of my recent mobile IP >>addresses in the GeoIP lookup. All of them quoted Melbourne someplace, >>some in the CBD

Re: Understanding other people's code

2013-07-12 Thread Joel Goldstick
On Fri, Jul 12, 2013 at 6:11 PM, Terry Reedy wrote: > On 7/12/2013 10:22 AM, L O'Shea wrote: > >> Hi all, I've been asked to take over a project from someone else and >> to extend the functionality of this. The project is written in Python >> which I haven't had any real experience with (although

Re: RE Module Performance

2013-07-12 Thread MRAB
On 12/07/2013 23:16, Tim Delaney wrote: On 13 July 2013 03:58, Devyn Collier Johnson mailto:devyncjohn...@gmail.com>> wrote: Thanks for the thorough response. I learned a lot. You should write articles on Python. I plan to spend some time optimizing the re.py module for Unix sys

Re: RE Module Performance

2013-07-12 Thread Michael Torrie
On 07/12/2013 09:59 AM, Joshua Landau wrote: > If you're interested, the basic of it is that strings now use a > variable number of bytes to encode their values depending on whether > values outside of the ASCII range and some other range are used, as an > optimisation. Variable number of bytes is

Re: Editor Ergonomics [was: Important features for editors]

2013-07-12 Thread Eric S. Johansson
On Fri, 12 Jul 2013 18:34:30 -0400, Dennis Lee Bieber wrote: Sounds like you might have liked an accessory I had on my Amiga. Basically a proportional joystick feeding an interface box which converted the position value into a sequence of mouse movements -- sounds very cool. Alt

Re: RE Module Performance

2013-07-12 Thread Tim Delaney
On 13 July 2013 03:58, Devyn Collier Johnson wrote: > > Thanks for the thorough response. I learned a lot. You should write > articles on Python. > I plan to spend some time optimizing the re.py module for Unix systems. I > would love to amp up my programs that use that module. If you are findin

Re: Understanding other people's code

2013-07-12 Thread Terry Reedy
On 7/12/2013 10:22 AM, L O'Shea wrote: Hi all, I've been asked to take over a project from someone else and to extend the functionality of this. The project is written in Python which I haven't had any real experience with (although I do really like it) so I've spent the last week or two settling

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread MRAB
On 12/07/2013 17:32, Νικόλας wrote: I know i have asked before but hwta i get is ISP city not visitors precise city. GeoLiteCity.dat isnt accurate that's why it comes for free. i must somehow get access to GeoIPCity.dat which is the full version. And of course it can be done, i dont want to be

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Terry Reedy
On 7/12/2013 1:19 PM, Ian Kelly wrote: Try this: 1) Go to http://incloak.com (or any other free web proxy site). 2) Paste in the URL http://www.geoiptool.com and press Enter 3) See where it thinks you are now. When I tried it, it placed me on the wrong side of the Atlantic Ocean. Me to. Than

Re: hex dump w/ or w/out utf-8 chars

2013-07-12 Thread Joshua Landau
On 9 July 2013 10:34, wrote: > There is no symbole for radian because mathematically > radian is a pure number, a unitless number. You can > hower sepecify a = ... in radian (rad). > Isn't a superscript "c" the symbol for radians? -- http://mail.python.org/mailman/listinfo/python-list

Re: hex dump w/ or w/out utf-8 chars

2013-07-12 Thread wxjmfauth
Le vendredi 12 juillet 2013 05:18:44 UTC+2, Steven D'Aprano a écrit : > On Thu, 11 Jul 2013 11:42:26 -0700, wxjmfauth wrote: > > > Now all your strings will be just as heavy, every single variable name > > and attribute name will use four times as much memory. Happy now? > >>> 㑖 = 9

Re: RE Module Performance

2013-07-12 Thread Devyn Collier Johnson
On 07/12/2013 12:21 PM, Chris Angelico wrote: On Fri, Jul 12, 2013 at 8:45 PM, Devyn Collier Johnson wrote: Could you explain what you mean? What and where is the new Flexible String Representation? (You're top-posting again. Please put your text underneath what you're responding to - it help

Re: Question about mailing list rules

2013-07-12 Thread Devyn Collier Johnson
On 07/12/2013 07:11 AM, Chris “Kwpolska” Warrick wrote: On Fri, Jul 12, 2013 at 12:47 PM, Chris Angelico wrote: On Fri, Jul 12, 2013 at 8:44 PM, Devyn Collier Johnson wrote: I am going to love this mailing list even more. Really, only Python code? I wanted to ask Python users about Perl! (^

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Ian Kelly
On Fri, Jul 12, 2013 at 10:32 AM, Νικόλας wrote: > > I know i have asked before but hwta i get is ISP city not visitors precise > city. > > GeoLiteCity.dat isnt accurate that's why it comes for free. > i must somehow get access to GeoIPCity.dat which is the full version. > > And of course it can b

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Joel Goldstick
On Fri, Jul 12, 2013 at 11:52 AM, Νικόλας wrote: > Στις 12/7/2013 6:32 μμ, ο/η Dave Angel έγραψε: > > >> I suggest you read that geoiptool site, in particular the page >> >> http://www.geoiptool.com/en/**ip_info/ >> >> There is some misinformation, but notice

Re: UTF-EBCDIC encoding?

2013-07-12 Thread Joel Goldstick
On Fri, Jul 12, 2013 at 3:12 PM, Skip Montanaro wrote: > > I can't help you. I'm astonished. Trying to imagine the work > environment > > where this technology would be necessary > > http://www.iseriespython.com/app/ispMain.py/Start?job=Home > > Skip > I remember the AS400 series.. although I n

Re: UTF-EBCDIC encoding?

2013-07-12 Thread Skip Montanaro
> I can't help you. I'm astonished. Trying to imagine the work environment > where this technology would be necessary http://www.iseriespython.com/app/ispMain.py/Start?job=Home Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF-EBCDIC encoding?

2013-07-12 Thread Joel Goldstick
On Fri, Jul 12, 2013 at 2:11 PM, Wayne Werner wrote: > Is anyone aware of a UTF-EBCDIC[1] decoder? > > While Python does have a few EBCDIC dialects in the codecs, it does not > have the (relatively new?) UTF-EBCDIC one. > > Additionally, if anyone is aware of a Python tool that can unpack a > mai

UTF-EBCDIC encoding?

2013-07-12 Thread Wayne Werner
Is anyone aware of a UTF-EBCDIC[1] decoder? While Python does have a few EBCDIC dialects in the codecs, it does not have the (relatively new?) UTF-EBCDIC one. Additionally, if anyone is aware of a Python tool that can unpack a mainframe PDS file, that would also be worthwhile. Thanks, Wayn

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Chris Angelico
On Sat, Jul 13, 2013 at 2:38 AM, Grant Edwards wrote: > On 2013-07-12, ?? wrote: >> When visiting http://www.geoiptool.com/en/__ip_info/ it pinpoints my >> _exact_ city of living, not the ISP's. It did not even ask me to >> allow a geop ip javascript to run it present sit instantly. >

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Chris Angelico
On Sat, Jul 13, 2013 at 1:32 AM, Dave Angel wrote: >> >> There is definately i way to identify the users location based solely on >> its ip address as this site does it: http://www.geoiptool.com/ >> > > Sure, and as long as you don't mind it being 1000 miles off, you too can > claim to do it too.

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Grant Edwards
On 2013-07-12, ?? wrote: > I know i have asked before but hwta i get is ISP city not visitors > precise city. You can't reliably do that. > GeoLiteCity.dat isnt accurate that's why it comes for free. i must > somehow get access to GeoIPCity.dat which is the full version. > > And of

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Νικόλας
I know i have asked before but hwta i get is ISP city not visitors precise city. GeoLiteCity.dat isnt accurate that's why it comes for free. i must somehow get access to GeoIPCity.dat which is the full version. And of course it can be done, i dont want to believe that it cant. When visiting

Re: RE Module Performance

2013-07-12 Thread Chris Angelico
On Fri, Jul 12, 2013 at 8:45 PM, Devyn Collier Johnson wrote: > Could you explain what you mean? What and where is the new Flexible String > Representation? (You're top-posting again. Please put your text underneath what you're responding to - it helps maintain flow and structure.) Python versio

Re: RE Module Performance

2013-07-12 Thread Peter Otten
Joshua Landau wrote: > On 12 July 2013 11:45, Devyn Collier Johnson > wrote: >> Could you explain what you mean? What and where is the new Flexible >> String Representation? > > Do not worry. jmf is on about his old rant comparing broken previous > versions of Python to newer ones which in some

Re: Understanding other people's code

2013-07-12 Thread Eric S. Johansson
On Fri, 12 Jul 2013 10:22:59 -0400, L O'Shea wrote: Literally any idea will help, pen and paper, printing off all the code and doing some sort of highlighting session - anything! I keep reading bits of code and thinking "well where the hell has that been defined and what does it mean" to

Re: RE Module Performance

2013-07-12 Thread Joshua Landau
On 12 July 2013 11:45, Devyn Collier Johnson wrote: > Could you explain what you mean? What and where is the new Flexible String > Representation? Do not worry. jmf is on about his old rant comparing broken previous versions of Python to newer ones which in some microbenchmarks are slower. I don'

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Νικόλας
Στις 12/7/2013 6:32 μμ, ο/η Dave Angel έγραψε: I suggest you read that geoiptool site, in particular the page http://www.geoiptool.com/en/ip_info/ There is some misinformation, but notice carefully the part about dynamic IP addresses. Probably 99% of the individual users on the web (the ones

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-12 Thread Dave Angel
On 07/12/2013 07:56 AM, Ferrous Cranus wrote: Στις 12/7/2013 2:47 μμ, ο/η Wayne Werner έγραψε: On Thu, 4 Jul 2013, Νίκος Γκρ33κ wrote: Στις 4/7/2013 6:10 μμ, ο/η MRAB έγραψε: What do you mean "I don't know how to catch the exception with OSError"? You've tried "except socket.gaierror" and "ex

Re: Question about mailing list rules

2013-07-12 Thread Devyn Collier Johnson
I am going to love this mailing list even more. Really, only Python code? I wanted to ask Python users about Perl! (^u^) Devyn Collier Johnson On 07/12/2013 03:26 AM, Chris Angelico wrote: On Fri, Jul 12, 2013 at 9:59 AM, Devyn Collier Johnson wrote: Am I allowed to ask questions like "Here

Re: RE Module Performance

2013-07-12 Thread Devyn Collier Johnson
Could you explain what you mean? What and where is the new Flexible String Representation? Devyn Collier Johnson On 07/12/2013 05:23 AM, wxjmfa...@gmail.com wrote: Le vendredi 12 juillet 2013 01:44:05 UTC+2, Devyn Collier Johnson a écrit : I recently saw an email in this mailing list about t

Re: Question about mailing list rules

2013-07-12 Thread Devyn Collier Johnson
On 07/12/2013 09:04 AM, Roy Smith wrote: In article , Chris Angelico wrote: On Fri, Jul 12, 2013 at 9:59 AM, Devyn Collier Johnson wrote: Am I allowed to ask questions like "Here is my code. How can I optimize it?" on this mailing list? Sure you can! And you'll get a large number of resp

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Dave Angel
On 07/12/2013 10:18 AM, Νικόλας wrote: Hello, iam still looking for a way to identify the city of my website visitors. I cant even import the module even though my 'pip install geopip2' wa successful Either it wasn't successful, or it's not the package you thought. There are lots of

Re: Understanding other people's code

2013-07-12 Thread Peter Otten
L O'Shea wrote: > Hi all, > I've been asked to take over a project from someone else and to extend the > functionality of this. The project is written in Python which I haven't > had any real experience with (although I do really like it) so I've spent > the last week or two settling in, trying to

Re: Question about mailing list rules

2013-07-12 Thread Dave Angel
On 07/12/2013 08:34 AM, Chris “Kwpolska” Warrick wrote: On Fri, Jul 12, 2013 at 2:25 PM, Devyn Collier Johnson wrote: One more thing Devyn should do is watch the “To:” field and make sure it says python-list@python.org, because the above message was sent to Chris only, and that is not

Re: [Python-ideas] float('∞')=float('inf')

2013-07-12 Thread Chris Angelico
On Sat, Jul 13, 2013 at 12:52 AM, Chris Angelico wrote: > On Sat, Jul 13, 2013 at 12:43 AM, Gerald Britton > wrote: >> Man I don't know how you are doing this! I just tried: >> >> float('') and got >> >> Value error: could not convert string to float '' >> >> For that matter, I can't figure out

Re: [Python-ideas] float('∞')=float('inf')

2013-07-12 Thread Chris Angelico
On Sat, Jul 13, 2013 at 12:43 AM, Gerald Britton wrote: > Man I don't know how you are doing this! I just tried: > > float('') and got > > Value error: could not convert string to float '' > > For that matter, I can't figure out how to type the greek letter for > pi in gmail! Guess I have some t

Re: Understanding other people's code

2013-07-12 Thread Chris Angelico
On Sat, Jul 13, 2013 at 12:22 AM, L O'Shea wrote: > I'm starting to get pretty worried about my lack of overall progress and so I > wondered if anyone out there had some tips and techniques for understanding > other peoples code. There has to be 10/15 different scripts with at least 10 > functi

Understanding other people's code

2013-07-12 Thread L O'Shea
Hi all, I've been asked to take over a project from someone else and to extend the functionality of this. The project is written in Python which I haven't had any real experience with (although I do really like it) so I've spent the last week or two settling in, trying to get my head around Pyth

GeoIP2 for retrieving city and region ?

2013-07-12 Thread Νικόλας
Hello, iam still looking for a way to identify the city of my website visitors. The closet i have gone is to come up with the visitor's ISP city: try: gi = pygeoip.GeoIP('/usr/local/share/GeoLiteCity.dat') city = gi.time_zone_by_addr( os.environ['HTTP_CF_CONNECTING_IP'] )

Re: Question about mailing list rules

2013-07-12 Thread Roy Smith
In article , Chris Angelico wrote: > On Fri, Jul 12, 2013 at 9:59 AM, Devyn Collier Johnson > wrote: > > Am I allowed to ask questions like "Here is my code. How can I optimize it?" > > on this mailing list? > > Sure you can! And you'll get a large number of responses, not all of > which are d

Re: Question about mailing list rules

2013-07-12 Thread Chris “Kwpolska” Warrick
On Fri, Jul 12, 2013 at 2:25 PM, Devyn Collier Johnson wrote: > > On 07/12/2013 07:11 AM, Chris “Kwpolska” Warrick wrote: >> >> On Fri, Jul 12, 2013 at 12:47 PM, Chris Angelico wrote: >>> >>> On Fri, Jul 12, 2013 at 8:44 PM, Devyn Collier Johnson >>> wrote: I am going to love this mail

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-12 Thread Ferrous Cranus
Στις 12/7/2013 2:47 μμ, ο/η Wayne Werner έγραψε: On Thu, 4 Jul 2013, Νίκος Γκρ33κ wrote: Στις 4/7/2013 6:10 μμ, ο/η MRAB έγραψε: What do you mean "I don't know how to catch the exception with OSError"? You've tried "except socket.gaierror" and "except socket.herror", well just write "except OS

Re: Kivy for Python 3.3

2013-07-12 Thread fronagzen
On Friday, July 12, 2013 6:14:46 PM UTC+8, Paul Kölle wrote: > Am 11.07.2013 16:26, schrieb fronag...@gmail.com: > > [scnipp] > > > C:\MinGW\bin\gcc.exe -mdll -O -Wall -IC:\Python33\include > > > -IC:\Python33\include -c kivy\graphics\vertex_instructions.c -o > > > build\temp.win32-3.3\Release\

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-12 Thread Wayne Werner
On Thu, 4 Jul 2013, Νίκος Γκρ33κ wrote: Στις 4/7/2013 6:10 μμ, ο/η MRAB έγραψε: What do you mean "I don't know how to catch the exception with OSError"? You've tried "except socket.gaierror" and "except socket.herror", well just write "except OSError" instead! try: host = socket.geth

Re: Question about mailing list rules

2013-07-12 Thread Chris “Kwpolska” Warrick
On Fri, Jul 12, 2013 at 12:47 PM, Chris Angelico wrote: > On Fri, Jul 12, 2013 at 8:44 PM, Devyn Collier Johnson > wrote: >> I am going to love this mailing list even more. >> >> Really, only Python code? I wanted to ask Python users about Perl! (^u^) >> >> Devyn Collier Johnson > > Heh. You'd be

Re: Question about mailing list rules

2013-07-12 Thread Chris Angelico
On Fri, Jul 12, 2013 at 8:44 PM, Devyn Collier Johnson wrote: > I am going to love this mailing list even more. > > Really, only Python code? I wanted to ask Python users about Perl! (^u^) > > Devyn Collier Johnson Heh. You'd be surprised what comes up. If it's at least broadly related to Python

Re: Callable or not callable, that is the question!

2013-07-12 Thread Peter Otten
Steven D'Aprano wrote: > On Fri, 12 Jul 2013 07:36:30 +, Duncan Booth wrote: > >> To be a convincing use-case you would have to show a situation where >> something had to be both a static method and a utility method rather >> than just one or the other and also where you couldn't just have bo

Re: Kivy for Python 3.3

2013-07-12 Thread Paul Kölle
Am 11.07.2013 16:26, schrieb fronag...@gmail.com: [scnipp] C:\MinGW\bin\gcc.exe -mdll -O -Wall -IC:\Python33\include -IC:\Python33\include -c kivy\graphics\vertex_instructions.c -o build\temp.win32-3.3\Release\kivy\grap hics\vertex_instructions.o In file included from kivy\graphics\vertex_instruc

Re: Callable or not callable, that is the question!

2013-07-12 Thread Steven D'Aprano
On Fri, 12 Jul 2013 07:36:30 +, Duncan Booth wrote: > To be a convincing use-case you would have to show a situation where > something had to be both a static method and a utility method rather > than just one or the other and also where you couldn't just have both. I have a class where I hav

Re: RE Module Performance

2013-07-12 Thread Chris Angelico
On Fri, Jul 12, 2013 at 7:39 PM, Joshua Landau wrote: > On 12 July 2013 10:27, Chris Angelico wrote: >> On Fri, Jul 12, 2013 at 7:23 PM, wrote: >>> >>> I would not care too much about the performance >>> of re. >>> >>> With the new Flexible String Representation, you >>> can use a logarithmic s

Re: RE Module Performance

2013-07-12 Thread Joshua Landau
On 12 July 2013 10:27, Chris Angelico wrote: > On Fri, Jul 12, 2013 at 7:23 PM, wrote: >> >> I would not care too much about the performance >> of re. >> >> With the new Flexible String Representation, you >> can use a logarithmic scale to compare re results. >> To be honest, there is improvment

Re: RE Module Performance

2013-07-12 Thread Chris Angelico
On Fri, Jul 12, 2013 at 7:23 PM, wrote: > > I would not care too much about the performance > of re. > > With the new Flexible String Representation, you > can use a logarithmic scale to compare re results. > To be honest, there is improvment if you are an > ascii user. > > Am I the only one who

Re: RE Module Performance

2013-07-12 Thread wxjmfauth
Le vendredi 12 juillet 2013 01:44:05 UTC+2, Devyn Collier Johnson a écrit : > I recently saw an email in this mailing list about the RE module being > > made slower. I no long have that email. However, I have viewed the > > source for the RE module, but I did not see any code that would slow >

Re: Callable or not callable, that is the question!

2013-07-12 Thread Duncan Booth
Ulrich Eckhardt wrote: > Am 11.07.2013 16:11, schrieb Peter Otten: >> Ulrich Eckhardt wrote: >>> Bug or feature? >> >> No bug. Missing feature if you come up with a convincing use-case. > > class Parser: > def _handle_bool(input): > # ... > pass > > types = {'bool':

Re: Question about mailing list rules

2013-07-12 Thread Andreas Perstinger
On 12.07.2013 01:59, Devyn Collier Johnson wrote: Am I allowed to ask questions like "Here is my code. How can I optimize it?" on this mailing list? If it's written in Python, why not? But that doesn't mean you are guaranteed to get an answer :-). And please read http://sscce.org/ before post

Re: Question about mailing list rules

2013-07-12 Thread Chris Angelico
On Fri, Jul 12, 2013 at 9:59 AM, Devyn Collier Johnson wrote: > Am I allowed to ask questions like "Here is my code. How can I optimize it?" > on this mailing list? Sure you can! And you'll get a large number of responses, not all of which are directly to do with your question. :) I assume the c

Re: RE Module Performance

2013-07-12 Thread Chris Angelico
On Fri, Jul 12, 2013 at 9:44 AM, Devyn Collier Johnson wrote: > I recently saw an email in this mailing list about the RE module being made > slower. I no long have that email. However, I have viewed the source for the > RE module, but I did not see any code that would slow down the script for no

Re: hex dump w/ or w/out utf-8 chars

2013-07-12 Thread Chris Angelico
On Fri, Jul 12, 2013 at 4:42 AM, wrote: > BTW, since > when a serious coding scheme need an extermal marker? > All of them. Content-type: text/plain; charset=UTF-8 ChrisA -- http://mail.python.org/mailman/listinfo/python-list

RE Module Performance

2013-07-12 Thread Devyn Collier Johnson
I recently saw an email in this mailing list about the RE module being made slower. I no long have that email. However, I have viewed the source for the RE module, but I did not see any code that would slow down the script for no valid reason. Can anyone explain what that user meant or if I mis

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

Question about mailing list rules

2013-07-12 Thread Devyn Collier Johnson
Am I allowed to ask questions like "Here is my code. How can I optimize it?" on this mailing list? Mahalo, Devyn Collier Johnson devyncjohn...@gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Callable or not callable, that is the question!

2013-07-12 Thread Ulrich Eckhardt
Am 11.07.2013 16:11, schrieb Peter Otten: Ulrich Eckhardt wrote: Bug or feature? No bug. Missing feature if you come up with a convincing use-case. class Parser: def _handle_bool(input): # ... pass types = {'bool': _handle_bool, 'boolean': _handle_bool,}

Re: Callable or not callable, that is the question!

2013-07-12 Thread Ian Kelly
On Thu, Jul 11, 2013 at 8:12 PM, Steven D'Aprano wrote: > On Thu, 11 Jul 2013 15:05:59 +0200, Ulrich Eckhardt wrote: > >> Hello! >> >> I just stumbled over a case where Python (2.7 and 3.3 on MS Windows) >> fail to detect that an object is a function, using the callable() >> builtin function. Inve

Re: Documenting builtin methods

2013-07-12 Thread Joshua Landau
On 12 July 2013 04:43, alex23 wrote: > > My last post seems to have been eaten by either Thunderbird or the > EternalSeptember servers, but it contained an erroneous claim that the > straight function version performed as well as the factory one. However, in > the interim a co-worker has come up w