Re: Encoding of Python 2 string literals

2015-07-22 Thread Chris Angelico
On Thu, Jul 23, 2015 at 3:58 PM, dieter wrote: > Steven D'Aprano writes: >> On Wed, 22 Jul 2015 08:17 pm, anatoly techtonik wrote: >>> Is there a way to know encoding of string (bytes) literal >>> defined in source file? For example, given that source: >>> >>> # -*- coding: utf-8 -*- >>>

Re: Encoding of Python 2 string literals

2015-07-22 Thread dieter
Steven D'Aprano writes: > On Wed, 22 Jul 2015 08:17 pm, anatoly techtonik wrote: >> Is there a way to know encoding of string (bytes) literal >> defined in source file? For example, given that source: >> >> # -*- coding: utf-8 -*- >> from library import Entry >> Entry("текст") >> >>

Re: Encoding of Python 2 string literals

2015-07-22 Thread dieter
Mark Lawrence writes: > On 22/07/2015 11:17, anatoly techtonik wrote: > ... > Without question you are the most appalling person who should by > definition be excluded from the Python community. You refuse point > blank to contribute to the bug tracker, you've already been banned > from several

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Steven D'Aprano
On Thursday 23 July 2015 04:09, Rustom Mody wrote: > tl;dr To me (as unprofessional a musician as mathematician) I find it > arbitrary that Newton *discovered* gravity whereas Beethoven *composed* > the 9th symphony. Newton didn't precisely *discover* gravity. I'm pretty sure that people before

Re: [OT] Can I copy/paste Python code?

2015-07-22 Thread Steven D'Aprano
On Thursday 23 July 2015 07:56, Michael Torrie wrote: > Though it seems to me Linux desktops are becoming more and more like > Windows in the ways that drove me to really like X11 desktops. For > example, client-side decorations always bugged me in Windows especially > when an app would freeze an

Re: unexpected output while using list(and nested dictionary)

2015-07-22 Thread Steven D'Aprano
On Thursday 23 July 2015 08:09, max scalf wrote: > Hello List, > > I have posted a question on stack overflow for better readability ... but > is intended for python list Please see question below... If it's intended for here, please ask it here. Consider that there may be people here who a

Re: Encoding of Python 2 string literals

2015-07-22 Thread Steven D'Aprano
On Thursday 23 July 2015 07:26, Mark Lawrence wrote: > Oh, and please do not tell me to back off. It has been show in recent > days that despite my problems I have contributed to core Python. > Anatoly will contribute to any project, but on his terms, and his terms > only. I have never done any

Re: convert output to list(and nested dictionary)

2015-07-22 Thread Steven D'Aprano
On Thursday 23 July 2015 06:40, Mark Lawrence wrote: > On 22/07/2015 18:57, max scalf wrote: >> Hi Peter, >> >> Could you please explain what i am doing wrong? > > Amongst other things you're top posting. That is heavily frowned on > here. Please intersperse your replies or bottom post, thank y

Re: Can I copy/paste Python code?

2015-07-22 Thread Steven D'Aprano
On Thursday 23 July 2015 05:35, Grant Edwards wrote: > On 2015-07-22, Emile van Sebille wrote: >> Well, I select and right click copy then right click paste in where I >> want it. I never got into the center click options. > > That must be using something other than the standard X11 clipboard

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Steven D'Aprano
On Thursday 23 July 2015 03:48, Paul Rubin wrote: > Steven D'Aprano writes: >> That's wrong. If we had such a reason, we could state it: "the reason >> we expect natural numbers are irreducible is ..." and fill in the >> blank. But I don't believe that such a reason exists (or at least, as >> far

Re: Is there a way to install ALL Python packages?

2015-07-22 Thread Jason Swails
On Tue, Jul 21, 2015 at 10:58 PM, ryguy7272 wrote: > On Monday, July 20, 2015 at 10:57:47 PM UTC-4, ryguy7272 wrote: > > I'd like to install ALL Python packages on my machine. Even if it takes > up 4-5GB, or more, I'd like to get everything, and then use it when I need > it. Now, I'd like to im

Re: Should non-security 2.7 bugs be fixed?

2015-07-22 Thread Jason Swails
I am a little late to the party, but I feel that I have something to contribute to this discussion. Apologies for the top-post, but it's really in response to any particular question; more of a "this is my story with Python 2.7". I still use primarily Python 2.7, although I write code using six t

problem with selecting remote procedure calls

2015-07-22 Thread eric johansson
https://docs.google.com/drawings/d/1M-TzfRaSaAhFXQk1OmcmHNOaW31_7W_7q0bf8CAJqSw/edit?usp=sharing while this is related to my speech recognition through the next project, is actually a good question for RPCs in general. Specifically, are there any good-RPCs out there that are fast, supported, an

Re: unexpected output while using list(and nested dictionary)

2015-07-22 Thread Denis McMahon
On Wed, 22 Jul 2015 17:09:21 -0500, max scalf wrote: > I have posted a question on stack overflow for better readability ... > but is intended for python list Please see question below... It's quite obvious that your list and dictionary processing is not doing what you think it is. However,

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Chris Angelico
On Thu, Jul 23, 2015 at 11:44 AM, Dennis Lee Bieber wrote: > On Thu, 23 Jul 2015 03:21:24 +1000, Steven D'Aprano > declaimed the following: > >> >>"Are tomatoes red?" >> > In answer I offer a novel: /Fried Green Tomatoes at the Whistle Stop > Cafe/ (and lots of recipes for such on Google)

Re: password authentication failed

2015-07-22 Thread Chris Angelico
On Thu, Jul 23, 2015 at 9:35 AM, Gary Roach wrote: > At this point, I'm confused about a few things. Does the postgresql server > and my archivedb reside globally or are they inside my archivedb virtual > environment. I think globally. Your virtual environment is a Python construct only. That's w

Re: Should non-security 2.7 bugs be fixed?

2015-07-22 Thread Rick Johnson
On Wednesday, July 22, 2015 at 1:51:57 AM UTC-5, Terry Reedy wrote: > > Which is it? > > Mark is not a core dev [...] However His user name is > BreamoreBoy and his tracker email is the same breamore@ > address that recently upset you. Thank you for confirming my suspicion. You have always been h

Re: password authentication failed

2015-07-22 Thread Gary Roach
On 07/16/2015 04:53 PM, Chris Angelico wrote: On Fri, Jul 17, 2015 at 9:34 AM, Gary Roach wrote: On 07/15/2015 11:25 AM, Chris Angelico wrote: You should then be able to create a regular user, and grant appropriate permissions: postgres=# create user archives password 'traded-links-linguisti

Re: Find Minimum for element in multiple dimensional array

2015-07-22 Thread Emile van Sebille
On 7/22/2015 3:54 PM, Robert Davis wrote: I have an array of arrays that have a origin zip code, origin latitude, origin longitude, destination zip code, destination latitude, destination longitude, and miles between the two points. I need to keep only those combinations that represent the min

Re: unexpected output while using list(and nested dictionary)

2015-07-22 Thread Ben Finney
max scalf writes: > I have posted a question on stack overflow for better readability ... but > is intended for python list Please see question below... Please post (as a reply to your initial post, if you like) with the full question text in a message. Keep the discussion here in this forum

Find Minimum for element in multiple dimensional array

2015-07-22 Thread Robert Davis
Given a set of arrays within an array how do I find the arrays with the minimum values based on two elements/columns in the array? Those two elements/columns are the destination zip code and distance. I have an array of arrays that have a origin zip code, origin latitude, origin longitude, dest

Re: [OT] Can I copy/paste Python code?

2015-07-22 Thread Grant Edwards
On 2015-07-22, Michael Torrie wrote: > On 07/22/2015 01:35 PM, Grant Edwards wrote: >> That must be using something other than the standard X11 clipboard >> copy/paste mechnism. You shouldn't have to "right click copy", and >> many of the apps I paste into don't even have a "right click paste". >

Re: Integers with leading zeroes

2015-07-22 Thread Chris Angelico
On Thu, Jul 23, 2015 at 1:38 AM, MRAB wrote: >> Does the same condition hold for strings? If you are not performing string >> operations on something, it is not a string? >> > Tkinter comes to mind. You specify how widgets are laid out strings > that are basically flags: > > text_widget.pack(s

unexpected output while using list(and nested dictionary)

2015-07-22 Thread max scalf
Hello List, I have posted a question on stack overflow for better readability ... but is intended for python list Please see question below... http://stackoverflow.com/questions/31574860/unexpected-output-while-using-listand-nested-dictionary ​ ​Any pointers is much appreciated. -- https://

Re: [OT] Can I copy/paste Python code?

2015-07-22 Thread Michael Torrie
On 07/22/2015 01:35 PM, Grant Edwards wrote: > That must be using something other than the standard X11 clipboard > copy/paste mechnism. You shouldn't have to "right click copy", and > many of the apps I paste into don't even have a "right click paste". > > It sounds like evince has abandoned the

Re: Can I copy/paste Python code?

2015-07-22 Thread Emile van Sebille
On 7/22/2015 12:35 PM, Grant Edwards wrote: On 2015-07-22, Emile van Sebille wrote: On 7/21/2015 5:10 PM, Grant Edwards wrote: On 2015-07-21, Emile van Sebille wrote: On 7/21/2015 2:47 PM, Grant Edwards wrote: 1) You can't copy/paste text from evince _at_all_. Hmm, i just copied "Ac

Re: Encoding of Python 2 string literals

2015-07-22 Thread Mark Lawrence
On 22/07/2015 21:52, Terry Reedy wrote: On 7/22/2015 4:30 PM, Mark Lawrence wrote: http://www.scons.org/ In particular, he is, according to him, trying to make it possible to port it to 3.x. This is something we both want to encourage. I didn't say he was banned from the Python list. He has

Re: Can I copy/paste Python code?

2015-07-22 Thread Christian Gollwitzer
On 22.07.2015 16:53, Grant Edwards wrote: It's not Adobe's fault. PDF isn't _supposed_ to allow the reader to change the format. It's the fault of people who are chosing to generate PDF documents when they should be using something else. Classic PDF, yes. It is essentially a vector drawing fo

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Mark Lawrence
On 22/07/2015 19:14, Laura Creighton wrote: I don't suppose anybody could spare a bit of time for something that is slightly more important IMHO, like getting the core workflow going? I'm fairly well convinced that the vast majority of people here aren't in the slightest bit interested in act

Re: Encoding of Python 2 string literals

2015-07-22 Thread Terry Reedy
On 7/22/2015 4:30 PM, Mark Lawrence wrote: Mark, back off. Anatoly has not been banned from python-list. In fact, he has been told that this is where he *should* post, and not be off-topic. Not having the temperament to work with core Python, he is, apparently, trying to contribute to another

Re: Can I copy/paste Python code?

2015-07-22 Thread Grant Edwards
On 2015-07-22, Emile van Sebille wrote: > On 7/21/2015 5:10 PM, Grant Edwards wrote: >> On 2015-07-21, Emile van Sebille wrote: >>> On 7/21/2015 2:47 PM, Grant Edwards wrote: > 1) You can't copy/paste text from evince _at_all_. >>> >>> Hmm, i just copied "Acorsa Artichoke Heart - Quarter,

Re: convert output to list(and nested dictionary)

2015-07-22 Thread Mark Lawrence
On 22/07/2015 18:57, max scalf wrote: Hi Peter, Could you please explain what i am doing wrong? Amongst other things you're top posting. That is heavily frowned on here. Please intersperse your replies or bottom post, thank you. -- My fellow Pythonistas, ask not what our language can do f

Re: Encoding of Python 2 string literals

2015-07-22 Thread Mark Lawrence
On 22/07/2015 11:17, anatoly techtonik wrote: Hi, Is there a way to know encoding of string (bytes) literal defined in source file? For example, given that source: # -*- coding: utf-8 -*- from library import Entry Entry("текст") Is there any way for Entry() constructor to know t

Re: Can I copy/paste Python code?

2015-07-22 Thread Grant Edwards
On 2015-07-22, Emile van Sebille wrote: > On 7/21/2015 5:10 PM, Grant Edwards wrote: >> On 2015-07-21, Emile van Sebille wrote: >>> On 7/21/2015 2:47 PM, Grant Edwards wrote: > 1) You can't copy/paste text from evince _at_all_. >>> >>> Hmm, i just copied "Acorsa Artichoke Heart - Quarter,

Re: convert output to list(and nested dictionary)

2015-07-22 Thread max scalf
Hi Peter, Could you please explain what i am doing wrong? I did inspected the "get_all_security_groups()" object using dir and i do need the get_data function for this to work...as i have to parse the output...just getting the rule and grants does not work...as it comes with extra verbiage that i

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 10:49:13 -0700, Rustom Mody writes: >Nice Thanks for that Laura! >I am reminded of > >| The toughest job Indians ever had was explaining to the whiteman who their >| noun-god is. Repeat. That's because God isn't a noun in Native America. >| God is a verb! >>From ht

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Rustom Mody
On Wednesday, July 22, 2015 at 11:22:57 PM UTC+5:30, Oscar Benjamin wrote: > On Wed, 22 Jul 2015 at 18:01 Steven D'Aprano wrote: > > > > I think that the critical factor there is that it is all in the past tense. > > Today, I believe, the vast majority of mathematicians fall into two camps: >

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Rustom Mody
On Wednesday, July 22, 2015 at 11:18:23 PM UTC+5:30, Paul Rubin wrote: > Remember also that "in ultrafinitism, Peano Arithmetic goes from 1 to > 88" (due to Shachaf on irc #haskell). ;-) No No No Its 42; Dont you know? -- https://mail.python.org/mailman/listinfo/python-list

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Oscar Benjamin
On Wed, 22 Jul 2015 at 18:01 Steven D'Aprano wrote: > > I think that the critical factor there is that it is all in the past tense. > Today, I believe, the vast majority of mathematicians fall into two camps: > > (1) Those who just use numbers without worrying about defining them in some > deep o

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Rustom Mody
Nice Thanks for that Laura! I am reminded of | The toughest job Indians ever had was explaining to the whiteman who their | noun-god is. Repeat. That's because God isn't a noun in Native America. | God is a verb! From http://hilgart.org/enformy/dma-god.htm On Wednesday, July 22, 2015 at 10:48:38

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Paul Rubin
Steven D'Aprano writes: > That's wrong. If we had such a reason, we could state it: "the reason > we expect natural numbers are irreducible is ..." and fill in the > blank. But I don't believe that such a reason exists (or at least, as > far as we know). > > However, neither do we have any reason

Re: convert output to list(and nested dictionary)

2015-07-22 Thread Peter Otten
max scalf wrote: > I was able to solve the above problem i listed with the following...please > let me know if that is the correct way of doing this...or i am way off? > > >>> for sg in sgs: > for rule in sg.rules: > st = sg, sg.id, "inbound:", rule, " source:", rule.grants >

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Steven D'Aprano
On Thu, 23 Jul 2015 02:58 am, Steven D'Aprano wrote: >> 1. We have reason to expect that the natural numbers are absolutely >> fundamental and irreducible > > That's wrong. If we had such a reason, we could state it: "the reason we > expect natural numbers are irreducible is ..." and fill in the

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Laura Creighton
One way to look at this is to see that arithmetic is _behaviour_. Like all behaviours, it is subject to reification: see: https://en.wikipedia.org/wiki/Reification and especially as it is done in the German language, reification has this nasty habit of turning behaviours (i.e. things that are most

Re: convert output to list(and nested dictionary)

2015-07-22 Thread max scalf
I was able to solve the above problem i listed with the following...please let me know if that is the correct way of doing this...or i am way off? >>> for sg in sgs: for rule in sg.rules: st = sg, sg.id, "inbound:", rule, " source:", rule.grants s = str(st).replace(","," ")

OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Steven D'Aprano
On Wed, 22 Jul 2015 11:34 pm, Rustom Mody wrote: > On Tuesday, July 21, 2015 at 4:09:56 PM UTC+5:30, Steven D'Aprano wrote: > >> We have no reason to expect that the natural numbers are anything less >> than "absolutely fundamental and irreducible" (as the Wikipedia article >> above puts it). It'

Re: Can I copy/paste Python code?

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 14:53:42 -, Grant Edwards writes: >On 2015-07-22, Laura Creighton wrote: > >>>The entire purpose of PDF is to prevent people from changing the >>>format and appearance of documents. > >> My problem isn't that I don't understand this, my problem is that I >> thi

Re: Can I copy/paste Python code?

2015-07-22 Thread Emile van Sebille
On 7/21/2015 5:10 PM, Grant Edwards wrote: On 2015-07-21, Emile van Sebille wrote: On 7/21/2015 2:47 PM, Grant Edwards wrote: 1) You can't copy/paste text from evince _at_all_. Hmm, i just copied "Acorsa Artichoke Heart - Quarter, Water, Can" from a catalog pdf, so _at_all_ depends on s

Re: Integers with leading zeroes

2015-07-22 Thread MRAB
On 2015-07-22 16:50, Grant Edwards wrote: On 2015-07-22, MRAB wrote: On 2015-07-22 16:27, Antoon Pardon wrote: Does the same condition hold for strings? If you are not performing string operations on something, it is not a string? Tkinter comes to mind. You specify how widgets are laid out

Re: convert output to list(and nested dictionary)

2015-07-22 Thread max scalf
Hi Pablo, While playing around with the function you gave me(get_data)...i was thinking to do something like below. For each line create a dictionary then append that dictionary to a list...but before i even get to that part i get the below error and while researching it i am unable to figure out

Re: Integers with leading zeroes

2015-07-22 Thread Grant Edwards
On 2015-07-22, MRAB wrote: > On 2015-07-22 16:27, Antoon Pardon wrote: > >> Does the same condition hold for strings? If you are not performing string >> operations on something, it is not a string? > > Tkinter comes to mind. You specify how widgets are laid out strings > that are basically flags:

Re: Integers with leading zeroes

2015-07-22 Thread Grant Edwards
On 2015-07-22, Antoon Pardon wrote: > Does the same condition hold for strings? If you are not performing string > operations on something, it is not a string? If you never need to do any string operations on it then you should not be using a string. -- Grant Edwards grant.b.edwa

Re: Integers with leading zeroes

2015-07-22 Thread MRAB
On 2015-07-22 16:27, Antoon Pardon wrote: On 07/22/2015 11:09 AM, alister wrote: On Wed, 22 Jul 2015 09:12:59 +0200, Laura Creighton wrote: The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where the first check you do is 'does

Re: Integers with leading zeroes

2015-07-22 Thread Antoon Pardon
On 07/22/2015 11:09 AM, alister wrote: > On Wed, 22 Jul 2015 09:12:59 +0200, Laura Creighton wrote: > >> The biggest use I have for decimal numbers that begin with 0 is in >> credit card numbers, account numbers and the like where the first check >> you do is 'does this thing have the correct numb

Re: Integers with leading zeroes

2015-07-22 Thread Grant Edwards
On 2015-07-22, Steven D'Aprano wrote: > On Wed, 22 Jul 2015 11:51 pm, Grant Edwards wrote: > >> On 2015-07-22, Ben Finney wrote: >>> Laura Creighton writes: >>> The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where th

Re: Integers with leading zeroes

2015-07-22 Thread Steven D'Aprano
On Wed, 22 Jul 2015 11:51 pm, Grant Edwards wrote: > On 2015-07-22, Ben Finney wrote: >> Laura Creighton writes: >> >>> The biggest use I have for decimal numbers that begin with 0 is in >>> credit card numbers, account numbers and the like where the first >>> check you do is 'does this thing ha

Re: Can I copy/paste Python code?

2015-07-22 Thread Grant Edwards
On 2015-07-22, Laura Creighton wrote: >>The entire purpose of PDF is to prevent people from changing the >>format and appearance of documents. > My problem isn't that I don't understand this, my problem is that I > think this is, in nearly all cases, morally the wrong thing to do. > > So this me

Re: Encoding of Python 2 string literals

2015-07-22 Thread Chris Angelico
On Thu, Jul 23, 2015 at 12:38 AM, Steven D'Aprano wrote: > On Wed, 22 Jul 2015 08:17 pm, anatoly techtonik wrote: > >> Hi, >> >> Is there a way to know encoding of string (bytes) literal >> defined in source file? For example, given that source: >> >> # -*- coding: utf-8 -*- >> from librar

Re: Encoding of Python 2 string literals

2015-07-22 Thread Steven D'Aprano
On Wed, 22 Jul 2015 08:17 pm, anatoly techtonik wrote: > Hi, > > Is there a way to know encoding of string (bytes) literal > defined in source file? For example, given that source: > > # -*- coding: utf-8 -*- > from library import Entry > Entry("текст") > > Is there any way for Entr

Re: Can I copy/paste Python code?

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 13:54:22 -, Grant Edwards writes: >On 2015-07-22, Laura Creighton wrote: > >> She's absolutely stuck with the font choices somebody >> else made for everybody, > >Once again, that is the whole _point_ of PDF. > >> and they aren't right for her. > >> And this is

Re: Encoding of Python 2 string literals

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 22:39:56 +1000, Chris Angelico writes: >On Wed, Jul 22, 2015 at 8:17 PM, anatoly techtonik wrote: >> Is there a way to know encoding of string (bytes) literal >> defined in source file? For example, given that source: >> >> # -*- coding: utf-8 -*- >> from l

Re: Integers with leading zeroes

2015-07-22 Thread Rustom Mody
On Wednesday, July 22, 2015 at 7:21:29 PM UTC+5:30, Grant Edwards wrote: > On 2015-07-22, Ben Finney wrote: > > Laura Creighton writes: > > > >> The biggest use I have for decimal numbers that begin with 0 is in > >> credit card numbers, account numbers and the like where the first > >> check you d

Re: Can I copy/paste Python code?

2015-07-22 Thread Grant Edwards
On 2015-07-22, Laura Creighton wrote: > She's absolutely stuck with the font choices somebody > else made for everybody, Once again, that is the whole _point_ of PDF. > and they aren't right for her. > And this is way it is with the bulk of problems I end up having > to deal with from people w

Re: Integers with leading zeroes

2015-07-22 Thread Grant Edwards
On 2015-07-22, Ben Finney wrote: > Laura Creighton writes: > >> The biggest use I have for decimal numbers that begin with 0 is in >> credit card numbers, account numbers and the like where the first >> check you do is 'does this thing have the correct number of digits'. > > The following are exa

Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Rustom Mody
On Tuesday, July 21, 2015 at 4:09:56 PM UTC+5:30, Steven D'Aprano wrote: > We have no reason to expect that the natural numbers are anything less than > "absolutely fundamental and irreducible" (as the Wikipedia article above > puts it). It's remarkable that we can reduce all of mathematics to

Re: Encoding of Python 2 string literals

2015-07-22 Thread Chris Angelico
On Wed, Jul 22, 2015 at 8:17 PM, anatoly techtonik wrote: > Is there a way to know encoding of string (bytes) literal > defined in source file? For example, given that source: > > # -*- coding: utf-8 -*- > from library import Entry > Entry("текст") > > Is there any way for Entry() cons

Encoding of Python 2 string literals

2015-07-22 Thread anatoly techtonik
Hi, Is there a way to know encoding of string (bytes) literal defined in source file? For example, given that source: # -*- coding: utf-8 -*- from library import Entry Entry("текст") Is there any way for Entry() constructor to know that string "текст" passed into it is the utf-8 stri

Re: Integers with leading zeroes

2015-07-22 Thread Marko Rauhamaa
Laura Creighton : > What I want to know is why is 'huoneen numero' 2 words? rummets nummer Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: Integers with leading zeroes

2015-07-22 Thread INADA Naoki
Permitting leading 0s may make it harder to port Python 2 projects to Python 3. 010 == 8 (Python 2) 010 == 10 (Python 3.x) SyntaxError is very important for porting code. So I'm -1 on permitting leading 0s for decimal numbers. I think original question is for leading 0s for only 0. Not for arbi

Re: Integers with leading zeroes

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 12:10:55 +0300, Marko Rauhamaa writes: >My native Finnish luckily has distinct words for the two things: "luku" >(a quantity) and "numero" (a digit, numeral or label): > > luonnollinen luku (natural number) > kokonaisluku (integer) > rationaaliluku(ra

Re: Integers with leading zeroes

2015-07-22 Thread Marko Rauhamaa
Ben Finney : > Despite that they are represented in text with digits, and the > authority that generates them may even use some sequence of integers, > the types should not be treated as numbers. Let's just say that the word "number" has multiple meanings. Words with many meanings often lead to c

Re: Integers with leading zeroes

2015-07-22 Thread alister
On Wed, 22 Jul 2015 09:12:59 +0200, Laura Creighton wrote: > The biggest use I have for decimal numbers that begin with 0 is in > credit card numbers, account numbers and the like where the first check > you do is 'does this thing have the correct number of digits'. > So far, all the examples I've

Re: Integers with leading zeroes

2015-07-22 Thread Ben Finney
Laura Creighton writes: > The biggest use I have for decimal numbers that begin with 0 is in > credit card numbers, account numbers and the like where the first > check you do is 'does this thing have the correct number of digits'. The following are examples of types from the real world that peo

Re: Can I copy/paste Python code?

2015-07-22 Thread Chris Angelico
On Wed, Jul 22, 2015 at 5:55 PM, Jussi Piitulainen wrote: > Chris Angelico writes: > >> I use Evince on Debian, where it came prepackaged with my Xfce >> desktop. It identifies itself as "GNOME Document Viewer 3.14.1", >> leaving me wondering if the next version would be 3.14.12 in >> Knuth-style

Re: Can I copy/paste Python code?

2015-07-22 Thread Jussi Piitulainen
Chris Angelico writes: > I use Evince on Debian, where it came prepackaged with my Xfce > desktop. It identifies itself as "GNOME Document Viewer 3.14.1", > leaving me wondering if the next version would be 3.14.12 in > Knuth-style numbering, but that's beside the point. Copying and The next digi

Re: Can I copy/paste Python code?

2015-07-22 Thread Mark Lawrence
On 21/07/2015 18:25, Laura Creighton wrote: In a message of Wed, 22 Jul 2015 00:48:06 +1000, Chris Angelico writes: Actually, maybe don't use PDF at all. I keep having to help my Mum deal with stupid problems with PDF documents she gets, and I'm never sure whether the fault is with the PDF creat

Re: Integers with leading zeroes

2015-07-22 Thread Laura Creighton
I wonder if bitcoin miners and other cryptological users need the leading 0s. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to install ALL Python packages?

2015-07-22 Thread Laura Creighton
In a message of Tue, 21 Jul 2015 19:58:31 -0700, ryguy7272 writes: >Thanks for the tip. I just downloaded and installed Anaconda. I just >successfully ran my first Python script. So, so happy now. Thanks again!! Congratulations! Keep on going! :) Laura -- https://mail.python.org/mailman/li

Re: Integers with leading zeroes

2015-07-22 Thread Laura Creighton
The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where the first check you do is 'does this thing have the correct number of digits'. So far, all the examples I've been able to find in my code -- which does this sort of stuff a lot

Re: Can I copy/paste Python code?

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 10:45:29 +1000, "Steven D'Aprano" writes: >On Wed, 22 Jul 2015 03:25 am, Laura Creighton wrote: > >> Lots of the problems are with the free reader, adobe acrobat. It is >> designed so that the user is kept very much in a straight-jacket which >> is a problem when y