Re: sympy

2016-03-30 Thread Poul Riis
Den torsdag den 31. marts 2016 kl. 06.49.34 UTC+2 skrev Gregory Ewing: > Steven D'Aprano wrote: > > On Thu, 31 Mar 2016 02:23 am, Poul Riis wrote: > > > >>What I intend to do is to let sympy find the derivative of some > >>welldefined function and next define the foundation derivative as a normal

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Steven D'Aprano
On Thursday 31 March 2016 13:45, Paul Rubin wrote: > Steven D'Aprano writes: >> I want to see an actual application where adding a new key to a .^ >> mapping is expected to change the other keys. > directory["mary.roommate"] = "bob" > directory["mary.address"

Re: Python Array

2016-03-30 Thread Cameron Simpson
On 30Mar2016 22:53, Stephen Hansen wrote: On Wed, Mar 30, 2016, at 10:34 PM, tdspe...@gmail.com wrote: as you can see the option element was added third but is the first one displayed. Is this just standard - I am using Python 3.5 The order of items in dictionaries is based on the hash value

Re: Threading is foobared?

2016-03-30 Thread Steven D'Aprano
On Thursday 31 March 2016 15:50, Mark Sapiro wrote: > Hi all, > > I'm jumping in on this thread because Tim asked. [...] Thanks for the explanation! -- Steve -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Array

2016-03-30 Thread Jussi Piitulainen
Stephen Hansen writes: > On Wed, Mar 30, 2016, at 10:34 PM, tdspe...@gmail.com wrote: >> as you can see the option element was added third but is the first one >> displayed. >> >> Is this just standard - I am using Python 3.5 > > The order of items in dictionaries is based on the hash value -- wh

Re: Python Array

2016-03-30 Thread Mark Lawrence via Python-list
On 31/03/2016 06:34, tdspe...@gmail.com wrote: I am creating the following aData = [] This is a Python list, not an array as the subject gives. # get my data from database for row in rows: aData.append({row["tierid"]:"name":row["tiername"],"description":row["tierdesc"],"option":row["tie

Re: Python Array

2016-03-30 Thread Stephen Hansen
On Wed, Mar 30, 2016, at 10:34 PM, tdspe...@gmail.com wrote: > as you can see the option element was added third but is the first one > displayed. > > Is this just standard - I am using Python 3.5 The order of items in dictionaries is based on the hash value -- which while stable, should be consi

Re: Python Array

2016-03-30 Thread Chris Angelico
On Thu, Mar 31, 2016 at 4:34 PM, wrote: > as you can see the option element was added third but is the first one > displayed. > Dictionaries don't have any order to them, so yes, this is something you'll have to accept. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Python Array

2016-03-30 Thread tdsperth
I am creating the following aData = [] # get my data from database for row in rows: aData.append({row["tierid"]:"name":row["tiername"],"description":row["tierdesc"],"option":row["tieroption"],"price":str(row["tierprice"])}}) when I display the output the order the data was entered is not w

Re: Threading is foobared?

2016-03-30 Thread Random832
On Thu, Mar 31, 2016, at 01:25, Random832 wrote: > Actually, merely prepending the original Message-ID itself append, not prepend... I'd misremembered the order that References go in. -- https://mail.python.org/mailman/listinfo/python-list

Re: Threading is foobared?

2016-03-30 Thread Random832
On Thu, Mar 31, 2016, at 01:25, Random832 wrote: > > if a message is cross-posted to two lists which both gateway to Usenet, > > and Mailman didn't make the Message-IDs unique, the news server would > > discard one of the two posts as a duplicate and the post would be > > missing from one of the re

Re: Threading is foobared?

2016-03-30 Thread Random832
On Thu, Mar 31, 2016, at 00:50, Mark Sapiro wrote: > What Mailman does do as noted by Random832 is replace the Message-ID: > header value in posts gated to Usenet with a list specific, Mailman > generated unique value. There is a reason for this, and that reason is > if a message is cross-posted to

Re: Threading is foobared?

2016-03-30 Thread Mark Sapiro
Hi all, I'm jumping in on this thread because Tim asked. I'm here because I'm a Mailman developer and the primary maintainer of Mailman for the @python.org lists. Regarding the initial post in this thread from Steven D'Aprano suggesting that broken threading is more common recently and quoting a

Re: sympy

2016-03-30 Thread Gregory Ewing
Steven D'Aprano wrote: On Thu, 31 Mar 2016 02:23 am, Poul Riis wrote: What I intend to do is to let sympy find the derivative of some welldefined function and next define the foundation derivative as a normal function py> ftext.evalf(subs={x:3}) -0.0600 Given all that, it looks

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Paul Rubin
Steven D'Aprano writes: > I want to see an actual application where adding a new key to a > mapping is expected to change the other keys. directory["mary.roommate"] = "bob" directory["mary.address"] = None # unknown address ... directory["bob.address"] = "132 Elm Street" Since Bob and Mary are

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Steven D'Aprano
On Thu, 31 Mar 2016 03:52 am, Random832 wrote: > Like, these are common patterns: > > for i, x in enumerate(l): ># do some stuff, sometimes assign l[i] > > for k, v in d.items(): ># do some stuff, sometimes assign d[k] for a, b in zip(spam, eggs): # do some stuff, sometimes assign

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Steven D'Aprano
On Thu, 31 Mar 2016 06:07 am, Antoon Pardon wrote: >> Because fundamentally, it doesn't matter whether dicts are surjections or >> not. They're still many-to-one mappings, and those mappings between keys >> and values should not change due to the insertion or deletion of >> unrelated keys. > > Re

Re: ANN: Python 201 - Intermediate Python book

2016-03-30 Thread Chris Angelico
On Thu, Mar 31, 2016 at 6:21 AM, Ethan Furman wrote: > Note: I'm not affiliated with the book, probably won't pledge (only a > couple topics apply to me), but I am a KickStarter fan (having purchased > more games than was probably wise ;) . Heh, me too - though more other things than games. Betw

Re: Statements as expressions [was Re: Undefined behaviour in C]

2016-03-30 Thread Random832
On Wed, Mar 30, 2016, at 19:01, Dennis Lee Bieber wrote: > Though I'm surprised GoogleGroups would expire that fast. > > Google is the reason I inserted that header -- I started back in the > days when news-servers routinely expired stuff (text groups about monthly > lifespan, the bina

Re: Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
On 30/03/2016 17:35, Terry Reedy wrote: .theme_names() only displays the themes for the OS. I believe that there is a way to access themes for other OSes (unix, mac) but don't remember. Possibly http://bugs.python.org/issue17397 which refers to http://code.activestate.com/lists/python-tkint

Re: pygtk button right/middle click

2016-03-30 Thread Wildman via Python-list
On Wed, 30 Mar 2016 19:23:35 +, Grant Edwards wrote: > On 2016-03-30, Grant Edwards wrote: >> On 2016-03-30, Wildman wrote: >> Is the gtk button widget really incapable of handling left or middle mouse buttons or shift/ctrl/alt modifiers? >>> >>> This might help... >>> >>> http://f

Re: Learning Python (or Haskell) makes you a worse programmer

2016-03-30 Thread Gregory Ewing
Tim Golden wrote: (I don't know how other English-speaking groups say the word, but in England the first syllable is stressed and the second is the conventional short "uh" sound). I can attest that New Zealand follows the UK on this. I was surprised when I first heard an American pronounce it

Re: ANN: Python 201 - Intermediate Python book

2016-03-30 Thread Mike Driscoll
On Wednesday, March 30, 2016 at 2:21:08 PM UTC-5, Ethan Furman wrote: > On 03/30/2016 11:41 AM, justin walters wrote: > > > That absolutely answers my questions. I'll keep an eye out for your book > > when it is realeased. It seems like it will cover some topics that could be > > useful in continu

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Mark Lawrence via Python-list
On 30/03/2016 21:00, Marco Sulla via Python-list wrote: Let me also add that even if it seems that my idea will not break any official contracts, I can create a new ABC class and let maps and sequence types inherit from it. IMHO it's absolutely not needed, but at least the discussion will be no m

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Mark Lawrence via Python-list
On 30/03/2016 20:35, Marco Sulla via Python-list wrote: On 30 March 2016 at 02:55, Terry Reedy wrote: To me [seq.items() and seq.keys()] are useless and confusing duplications since enumerate()(seq) and range(len(seq)) are quite different from dict.items and dict.keys. It's true. Indeed IMHO

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Marco Sulla via Python-list
Let me also add that even if it seems that my idea will not break any official contracts, I can create a new ABC class and let maps and sequence types inherit from it. IMHO it's absolutely not needed, but at least the discussion will be no more distracted my secondary considerations, since the main

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Marco Sulla via Python-list
On 30 March 2016 at 02:55, Terry Reedy wrote: > To me [seq.items() and seq.keys()] are useless and confusing duplications > since enumerate()(seq) > and range(len(seq)) are quite different from dict.items and dict.keys. It's true. Indeed IMHO it's enumerate() that will be a confusing duplication

Re: pygtk button right/middle click

2016-03-30 Thread Grant Edwards
On 2016-03-30, Grant Edwards wrote: > On 2016-03-30, Wildman wrote: > >>> Is the gtk button widget really incapable of handling left or middle >>> mouse buttons or shift/ctrl/alt modifiers? >> >> This might help... >> >> http://faq.pygtk.org/index.py?req=show&file=faq05.004.htp > > Yep, I found t

Re: pygtk button right/middle click

2016-03-30 Thread Grant Edwards
On 2016-03-30, Wildman wrote: >> Is the gtk button widget really incapable of handling left or middle >> mouse buttons or shift/ctrl/alt modifiers? > > This might help... > > http://faq.pygtk.org/index.py?req=show&file=faq05.004.htp Yep, I found that. I'm just missing the clues required to use

Re: pygtk button right/middle click

2016-03-30 Thread Wildman via Python-list
On Wed, 30 Mar 2016 15:36:12 +, Grant Edwards wrote: > I'm trying to figure out how to get a pygtk button respond to > somehting other than just a simple "left click". With a standard > 3-button mouse, X11 provides at least 9 different "click" types, but > the pygtk button only seems to suppo

Re: ANN: Python 201 - Intermediate Python book

2016-03-30 Thread Ethan Furman
On 03/30/2016 11:41 AM, justin walters wrote: That absolutely answers my questions. I'll keep an eye out for your book when it is realeased. It seems like it will cover some topics that could be useful in continuing my learning. KickStarter plug: If you want to pledge to buying the book now o

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Antoon Pardon
Op 30-03-16 om 17:56 schreef Steven D'Aprano: > On Thu, 31 Mar 2016 12:12 am, Antoon Pardon wrote: > >> Op 30-03-16 om 14:22 schreef Steven D'Aprano: > > [...] >>> Why is a mapping (such as a dict) best described as a surjection? >>> Consider: >>> >>> d = {1: None, 2: 'a', 3: 'b', 4: None} >>> >>

Re: ANN: Python 201 - Intermediate Python book

2016-03-30 Thread justin walters
On Mar 30, 2016 11:21 AM, "Mike Driscoll" wrote: > > Hi Justin, > > > > https://mail.python.org/mailman/listinfo/python-list > > > > Can you go over a couple of the topics you are going to cover? > > > > Are you going to cover any of the most popular packages such as Django and > > scrapy? > > Sur

Re: ANN: Python 201 - Intermediate Python book

2016-03-30 Thread Mike Driscoll
Hi Justin, > > https://mail.python.org/mailman/listinfo/python-list > > Can you go over a couple of the topics you are going to cover? > > Are you going to cover any of the most popular packages such as Django and > scrapy? Sure! I'm planning on covering several of the more popular intermediate

Re: ANN: Python 201 - Intermediate Python book

2016-03-30 Thread justin walters
On Mar 30, 2016 8:41 AM, "Mike Driscoll" wrote: > > Hi, > > I just wanted to let you know that I am hard at work on my second book, which is entitled Python 201 which will come out this Fall 2016. I currently have a Kickstarter going where you can pre-order the book: https://www.kickstarter.com/pr

Re: pygtk button right/middle click

2016-03-30 Thread Grant Edwards
On 2016-03-30, Chris Angelico wrote: > On Thu, Mar 31, 2016 at 2:36 AM, Grant Edwards > wrote: >> I'm trying to figure out how to get a pygtk button respond to >> somehting other than just a simple "left click". With a standard >> 3-button mouse, X11 provides at least 9 different "click" types,

ArtWork in PyPyBox - Pure Python

2016-03-30 Thread Salvatore DI DIO
In pure Python, here is a nice image (for me at least) http://salvatore.diodev.fr/pypybox/ Regards -- https://mail.python.org/mailman/listinfo/python-list

Re: Statements as expressions [was Re: Undefined behaviour in C]

2016-03-30 Thread Rustom Mody
On Wednesday, March 30, 2016 at 10:37:58 PM UTC+5:30, Random832 wrote: > On Wed, Mar 30, 2016, at 12:59, Rustom Mody wrote: > > On Wednesday, March 30, 2016 at 7:56:50 PM UTC+5:30, Ben Bacarisse wrote: > > > Dennis Lee Bieber writes: > > > > Sorry Dennis > > Dont see you at all > > Neither on goo

Re: Statements as expressions [was Re: Undefined behaviour in C]

2016-03-30 Thread Random832
On Wed, Mar 30, 2016, at 12:59, Rustom Mody wrote: > On Wednesday, March 30, 2016 at 7:56:50 PM UTC+5:30, Ben Bacarisse wrote: > > Dennis Lee Bieber writes: > > Sorry Dennis > Dont see you at all > Neither on googlegroups -- which of course everyone loves to hate > Nor the archive: > https://mail

Re: Statements as expressions [was Re: Undefined behaviour in C]

2016-03-30 Thread Rustom Mody
On Wednesday, March 30, 2016 at 7:56:50 PM UTC+5:30, Ben Bacarisse wrote: > Dennis Lee Bieber writes: Sorry Dennis Dont see you at all Neither on googlegroups -- which of course everyone loves to hate Nor the archive: https://mail.python.org/pipermail/python-list/2016-March/date.html Only see y

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Random832
This discussion is getting a bit distracted from the original request. Let's look at it from a higher level. What is being requested, regardless of if you call it a "map interface" or whatever, is a single way, for sequences and maps... broadly, anything with a __getitem__, to iterate over all val

Re: Adding borders to ttk radiobuttons

2016-03-30 Thread Terry Reedy
On 3/30/2016 11:14 AM, Mark Lawrence via Python-list wrote: On 30/03/2016 15:55, ast wrote: "ast" a écrit dans le message de news:56fbe699$0$4548$426a7...@news.free.fr... "Mark Lawrence" a écrit dans le message de news:mailman.204.1459343690.28225.python-l...@python.org... I believe someth

Re: Help me

2016-03-30 Thread Ethan Furman
On 03/30/2016 06:10 AM, srinivas devaki wrote: ahh, this is the beginning of a conspiracy to waste my time. PS: just for laughs. not to offend any one. It's fair: you waste ours, we waste yours. :) A fair, if not good, trade. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-

Re: Adding borders to ttk radiobuttons

2016-03-30 Thread Terry Reedy
On 3/30/2016 11:01 AM, Mark Lawrence via Python-list wrote: On 30/03/2016 15:45, ast wrote: "Mark Lawrence" a écrit dans le message de news:mailman.204.1459343690.28225.python-l...@python.org... I believe something like this should suffice to display borders around the radiobuttons. import t

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Steven D'Aprano
On Wed, 30 Mar 2016 11:50 pm, Random832 wrote: > Absolutely nothing is stable under a *completely unrestricted* set of > operations. Yes, you're absolutely correct. If I create a Python dict, {1: 'a'}, and then smash the computer to smithereens with a 50lb sledge hammer, neither the key nor the v

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Steven D'Aprano
On Thu, 31 Mar 2016 12:12 am, Antoon Pardon wrote: > Op 30-03-16 om 14:22 schreef Steven D'Aprano: [...] >> Why is a mapping (such as a dict) best described as a surjection? >> Consider: >> >> d = {1: None, 2: 'a', 3: 'b', 4: None} >> >> >> Every key has exactly one value. There are no values wit

Re: sympy

2016-03-30 Thread Steven D'Aprano
On Thu, 31 Mar 2016 02:23 am, Poul Riis wrote: > What I intend to do is to let sympy find the derivative of some > welldefined function and next define the foundation derivative as a normal > function so that I can calculate numerical values or even make a graph. I'm glad you explained what you

Re: pygtk button right/middle click

2016-03-30 Thread Chris Angelico
On Thu, Mar 31, 2016 at 2:36 AM, Grant Edwards wrote: > I'm trying to figure out how to get a pygtk button respond to > somehting other than just a simple "left click". With a standard > 3-button mouse, X11 provides at least 9 different "click" types, but > the pygtk button only seems to support

Re: repeat items in a list

2016-03-30 Thread Peter Otten
Michael Selik wrote: > I prefer itertools.chain.from_iterable to the sum trick. > from itertools import chain lst = list('abc') list(chain.from_iterable([s]*3 for s in lst)) > ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c'] If you want to make this completely lazy: >>> from functoo

ANN: Python 201 - Intermediate Python book

2016-03-30 Thread Mike Driscoll
Hi, I just wanted to let you know that I am hard at work on my second book, which is entitled Python 201 which will come out this Fall 2016. I currently have a Kickstarter going where you can pre-order the book: https://www.kickstarter.com/projects/34257246/python-201-intermediate-python I act

pygtk button right/middle click

2016-03-30 Thread Grant Edwards
I'm trying to figure out how to get a pygtk button respond to somehting other than just a simple "left click". With a standard 3-button mouse, X11 provides at least 9 different "click" types, but the pygtk button only seems to support one of them. [Yes, I know there are left-handled mouse configu

Re: sympy

2016-03-30 Thread Robert Kern
On 2016-03-30 16:23, Poul Riis wrote: What I intend to do is to let sympy find the derivative of some welldefined function and next define the foundation derivative as a normal function so that I can calculate numerical values or even make a graph. http://docs.sympy.org/dev/modules/utilities/

Re: sympy

2016-03-30 Thread Poul Riis
What I intend to do is to let sympy find the derivative of some welldefined function and next define the foundation derivative as a normal function so that I can calculate numerical values or even make a graph. -- https://mail.python.org/mailman/listinfo/python-list

Re: Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
On 30/03/2016 15:55, ast wrote: "ast" a écrit dans le message de news:56fbe699$0$4548$426a7...@news.free.fr... "Mark Lawrence" a écrit dans le message de news:mailman.204.1459343690.28225.python-l...@python.org... I believe something like this should suffice to display borders around the ra

Re: Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
On 30/03/2016 15:45, ast wrote: "Mark Lawrence" a écrit dans le message de news:mailman.204.1459343690.28225.python-l...@python.org... I believe something like this should suffice to display borders around the radiobuttons. import tkinter as tk import tkinter.ttk as ttk root = tk.Tk() style =

Re: Adding borders to ttk radiobuttons

2016-03-30 Thread ast
"ast" a écrit dans le message de news:56fbe699$0$4548$426a7...@news.free.fr... "Mark Lawrence" a écrit dans le message de news:mailman.204.1459343690.28225.python-l...@python.org... I believe something like this should suffice to display borders around the radiobuttons. import tkinter as

Re: Adding borders to ttk radiobuttons

2016-03-30 Thread ast
"Mark Lawrence" a écrit dans le message de news:mailman.204.1459343690.28225.python-l...@python.org... I believe something like this should suffice to display borders around the radiobuttons. import tkinter as tk import tkinter.ttk as ttk root = tk.Tk() style = ttk.Style() style.configure('B

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Jussi Piitulainen
Marko Rauhamaa writes: > Steven D'Aprano: > >> On Wed, 30 Mar 2016 10:21 pm, Jussi Piitulainen wrote: >>> Ok, safer to say that some many-to-one mappings are not surjective. >> >> Can you give an example of a Python dict which is not surjective? > > Depends on the codomain. The values() method giv

Re: Instalação

2016-03-30 Thread Cecil Westerhof
On Wednesday 30 Mar 2016 15:36 CEST, Mark Lawrence wrote: > On 30/03/2016 14:13, Alan Evangelista wrote: >> >>> Não consigo instalar o python no meu Windows,gostaria de alguma >>> ajuda ou esclarecimento >> >> Natalia, you should use English in this mailing list. >> >> - download latest Python. Py

Re: Statements as expressions [was Re: Undefined behaviour in C]

2016-03-30 Thread Ben Bacarisse
Dennis Lee Bieber writes: > On Tue, 29 Mar 2016 20:14:02 -0700 (PDT), Rustom Mody > declaimed the following: > > >>Pascal ? C ? Python is a slide down because >>Pascal had the clear distinction of procedure and function > > That goes back to FORTRAN (in which one has SUBROUTINE subprocedur

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Jussi Piitulainen
Steven D'Aprano writes: > On Wed, 30 Mar 2016 10:21 pm, Jussi Piitulainen wrote: > >> Ok, safer to say that some many-to-one mappings are not surjective. > > Can you give an example of a Python dict which is not surjective? Can you give an example of a mapping which is not surjective? Can you rep

Re: Instalação

2016-03-30 Thread Mark Lawrence via Python-list
On 30/03/2016 14:13, Alan Evangelista wrote: Não consigo instalar o python no meu Windows,gostaria de alguma ajuda ou esclarecimento Natalia, you should use English in this mailing list. - download latest Python. Python has 2 different versions under development: Python 2 and Python 3. As yo

Re: Learning Python (or Haskell) makes you a worse programmer

2016-03-30 Thread Eric S. Johansson
On 3/30/2016 9:09 AM, Chris Angelico wrote: On Thu, Mar 31, 2016 at 12:06 AM, Eric S. Johansson wrote: I need a co-conspirator with better hands than mine to get through the next stage which is some form of an AST smart editor that operates on larger chunks such as idioms or snippets in a spe

Re: Instalação

2016-03-30 Thread Igor Korot
Hi, Natalia, On Wed, Mar 30, 2016 at 9:13 AM, Alan Evangelista wrote: > >> Não consigo instalar o python no meu Windows,gostaria de alguma ajuda ou >> esclarecimento > > > Natalia, you should use English in this mailing list. > > - download latest Python. Python has 2 different versions under dev

Re: Instalação

2016-03-30 Thread Alan Evangelista
Não consigo instalar o python no meu Windows,gostaria de alguma ajuda ou esclarecimento Natalia, you should use English in this mailing list. - download latest Python. Python has 2 different versions under development: Python 2 and Python 3. As you are a beginner, I recommend you use the mo

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Manolo Martínez
On 03/30/16 at 03:55pm, Marko Rauhamaa wrote: > Manolo Martínez : > > > On 03/30/16 at 02:44pm, Marko Rauhamaa wrote: > >> I don't even know if you can say much about the cardinality (or > >> countability) of mappings. The general set of mappings can't exist. > >> The *class* of mappings does exis

Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
I believe something like this should suffice to display borders around the radiobuttons. import tkinter as tk import tkinter.ttk as ttk root = tk.Tk() style = ttk.Style() style.configure('BW.TRadiobutton', borderwidth=5) buttonVar = tk.IntVar() rb1 = ttk.Radiobutton(text='Hello mum', variable=bu

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Antoon Pardon
Op 30-03-16 om 14:22 schreef Steven D'Aprano: > On Wed, 30 Mar 2016 09:28 pm, Jussi Piitulainen wrote: > >> Steven D'Aprano writes: >> >>> On Wed, 30 Mar 2016 06:12 pm, Jussi Piitulainen wrote: >>> Steven D'Aprano writes: > Given a surjection (many-to-one mapping) No. And I doubt

Re: Help me

2016-03-30 Thread srinivas devaki
ahh, this is the beginning of a conspiracy to waste my time. PS: just for laughs. not to offend any one. Regards Srinivas Devaki Junior (3rd yr) student at Indian School of Mines,(IIT Dhanbad) Computer Science and Engineering Department ph: +91 9491 383 249 telegram_id: @eightnoteight On Mar 30,

Re: Learning Python (or Haskell) makes you a worse programmer

2016-03-30 Thread Chris Angelico
On Thu, Mar 31, 2016 at 12:06 AM, Eric S. Johansson wrote: > I need a co-conspirator with better hands than mine to get through the next > stage which is some form of an AST smart editor that operates on larger > chunks such as idioms or snippets in a speech friendly way. Ideally I'd like > to see

Re: Learning Python (or Haskell) makes you a worse programmer

2016-03-30 Thread Eric S. Johansson
On 3/30/2016 6:21 AM, BartC wrote: On 30/03/2016 11:07, Sven R. Kunze wrote: On 30.03.2016 01:29, Eric S. Johansson wrote: On 3/29/2016 6:05 AM, Sven R. Kunze wrote: Python = English As someone who writes English text and code using speech recognition, I can assure you that Python is no

Re: sympy

2016-03-30 Thread Steven D'Aprano
On Wed, 30 Mar 2016 10:17 pm, Poul Riis wrote: > Is it possible to transfer results from sympy to 'normal' python. > > In the case below I think my intention is clear enough but it does not > work as intended. How can it be done? How can what be done? Unfortunately, we're not able to read your m

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Marko Rauhamaa
Manolo Martínez : > On 03/30/16 at 02:44pm, Marko Rauhamaa wrote: >> I don't even know if you can say much about the cardinality (or >> countability) of mappings. The general set of mappings can't exist. >> The *class* of mappings does exist in some set theories, but I don't >> believe classes hav

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Random832
On Wed, Mar 30, 2016, at 01:43, Steven D'Aprano wrote: > This is not an argument about dicts being mutable, because clearly they > aren't. This is an argument about key:value pairs being stable. "Stable" > doesn't mean "immutable". If you change the value associated with a key > directly, then i

Instalação

2016-03-30 Thread natalia camargo
Não consigo instalar o python no meu Windows,gostaria de alguma ajuda ou esclarecimento Enviado do Email para Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: repeat items in a list

2016-03-30 Thread Michael Selik
I prefer itertools.chain.from_iterable to the sum trick. >>> from itertools import chain >>> lst = list('abc') >>> list(chain.from_iterable([s]*3 for s in lst)) ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c'] On Tue, Mar 29, 2016 at 5:28 PM Vito De Tullio wrote: > Random832 wrote: > > > How do

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Marko Rauhamaa
Steven D'Aprano : > On Wed, 30 Mar 2016 10:21 pm, Jussi Piitulainen wrote: >> Ok, safer to say that some many-to-one mappings are not surjective. > > Can you give an example of a Python dict which is not surjective? Depends on the codomain. The values() method gives the range. If you have an ord

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Steven D'Aprano
On Wed, 30 Mar 2016 10:21 pm, Jussi Piitulainen wrote: > Ok, safer to say that some many-to-one mappings are not surjective. Can you give an example of a Python dict which is not surjective? Or an example of something which obeys the Mapping ABC which is not surjective? Artificial and contrived

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Manolo Martínez
On 03/30/16 at 02:44pm, Marko Rauhamaa wrote: > Jussi Piitulainen : > > > Manolo Martínez writes: > >> On 03/30/16 at 01:40pm, Jussi Piitulainen wrote: > >>> Yes, and most many-to-one mappings are *not* surjective. > >> > >> Well, I don't know about most, there are uncountably many surjective > >>

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Steven D'Aprano
On Wed, 30 Mar 2016 09:28 pm, Jussi Piitulainen wrote: > Steven D'Aprano writes: > >> On Wed, 30 Mar 2016 06:12 pm, Jussi Piitulainen wrote: >> >>> Steven D'Aprano writes: >>> Given a surjection (many-to-one mapping) >>> >>> No. And I doubt that Wikipedia says that. >> >> No to what? What

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Marko Rauhamaa
Jussi Piitulainen : > Manolo Martínez writes: >> On 03/30/16 at 01:40pm, Jussi Piitulainen wrote: >>> Yes, and most many-to-one mappings are *not* surjective. >> >> Well, I don't know about most, there are uncountably many surjective >> and non-surjective many-to-one mappings :) > > Ok, safer to s

Re: Learning Python (or Haskell) makes you a worse programmer

2016-03-30 Thread Sven R. Kunze
On 30.03.2016 12:21, BartC wrote: On 30/03/2016 11:07, Sven R. Kunze wrote: On 30.03.2016 01:29, Eric S. Johansson wrote: On 3/29/2016 6:05 AM, Sven R. Kunze wrote: Python = English As someone who writes English text and code using speech recognition, I can assure you that Python is not E

Re: sympy

2016-03-30 Thread Ned Batchelder
On Wednesday, March 30, 2016 at 7:17:33 AM UTC-4, Poul Riis wrote: > Is it possible to transfer results from sympy to 'normal' python. Poul, welcome to the group. > In the case below I think my intention is clear enough but it does not work > as intended. How can it be done? > > from sympy impo

Re: sympy

2016-03-30 Thread Ben Finney
Poul Riis writes: > Is it possible to transfer results from sympy to 'normal' python. Is Sympy not “normal Python”? What transfer are you intending? > In the case below I think my intention is clear enough but it does not > work as intended. How can it be done? First: no, your intention is not

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Jussi Piitulainen
Manolo Martínez writes: > On 03/30/16 at 01:40pm, Jussi Piitulainen wrote: >> Manolo Martínez writes: > > >> > I think it's with your definition of surjection. Bijections are >> > surjective, no? >> >> Yes, and most many-to-one mappings are *not* surjective. > > Well, I don't know about most, th

sympy

2016-03-30 Thread Poul Riis
Is it possible to transfer results from sympy to 'normal' python. In the case below I think my intention is clear enough but it does not work as intended. How can it be done? Poul Riis from sympy import * x=Symbol('x') ftext=diff(1/(x**2+1),x) def f(t): return ftext.subs(x,'t') print(f

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Jussi Piitulainen
Antoon Pardon writes: > Op 30-03-16 om 12:28 schreef Jussi Piitulainen: >> Steven D'Aprano writes: >> >>> On Wed, 30 Mar 2016 06:12 pm, Jussi Piitulainen wrote: >>> Steven D'Aprano writes: > Given a surjection (many-to-one mapping) No. And I doubt that Wikipedia says that. >>> N

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Manolo Martínez
On 03/30/16 at 01:40pm, Jussi Piitulainen wrote: > Manolo Martínez writes: > > > I think it's with your definition of surjection. Bijections are > > surjective, no? > > Yes, and most many-to-one mappings are *not* surjective. Well, I don't know about most, there are uncountably many surjective a

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Jussi Piitulainen
Manolo Martínez writes: > On 03/30/16 at 09:17pm, Steven D'Aprano wrote: >> On Wed, 30 Mar 2016 06:12 pm, Jussi Piitulainen wrote: >> >> > Steven D'Aprano writes: >> > >> >> Given a surjection (many-to-one mapping) >> > >> > No. And I doubt that Wikipedia says that. >> >> >> No to what? What

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Antoon Pardon
Op 30-03-16 om 12:28 schreef Jussi Piitulainen: > Steven D'Aprano writes: > >> On Wed, 30 Mar 2016 06:12 pm, Jussi Piitulainen wrote: >> >>> Steven D'Aprano writes: >>> Given a surjection (many-to-one mapping) >>> No. And I doubt that Wikipedia says that. >> No to what? What are you disagreein

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Manolo Martínez
On 03/30/16 at 09:17pm, Steven D'Aprano wrote: > On Wed, 30 Mar 2016 06:12 pm, Jussi Piitulainen wrote: > > > Steven D'Aprano writes: > > > >> Given a surjection (many-to-one mapping) > > > > No. And I doubt that Wikipedia says that. > > > No to what? What are you disagreeing with? > I think

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Jussi Piitulainen
Steven D'Aprano writes: > On Wed, 30 Mar 2016 06:12 pm, Jussi Piitulainen wrote: > >> Steven D'Aprano writes: >> >>> Given a surjection (many-to-one mapping) >> >> No. And I doubt that Wikipedia says that. > > No to what? What are you disagreeing with? Surjection does not mean many-to-one mappi

Re: Learning Python (or Haskell) makes you a worse programmer

2016-03-30 Thread BartC
On 30/03/2016 11:07, Sven R. Kunze wrote: On 30.03.2016 01:29, Eric S. Johansson wrote: On 3/29/2016 6:05 AM, Sven R. Kunze wrote: Python = English As someone who writes English text and code using speech recognition, I can assure you that Python is not English. :-) :D Interesting. Never

Re: Learning Python (or Haskell) makes you a worse programmer

2016-03-30 Thread Sven R. Kunze
On 30.03.2016 12:14, Tim Golden wrote: Not that you quite meant this, but I'm always amused (and still a little startled) when I listen to talks recorded from, say, PyCon and hear people with American accents pronouncing Python with the stress on the slightly longer second syllable. (I don't kno

Re: Calculate Bill

2016-03-30 Thread BartC
On 29/03/2016 23:33, Yum Di wrote: print ("Menu") print ( "1 = cheese and tomato: 3.50, " "2 = ham and pineapple: 4.20, " "3 = vegetarian: 5.20, " "4 = meat feast: 5.80, " "5 = seafood: 5.60 " ) Hey.. this code works. Sure, after you got rid of those list that were

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Steven D'Aprano
On Wed, 30 Mar 2016 06:12 pm, Jussi Piitulainen wrote: > Steven D'Aprano writes: > >> Given a surjection (many-to-one mapping) > > No. And I doubt that Wikipedia says that. No to what? What are you disagreeing with? -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Learning Python (or Haskell) makes you a worse programmer

2016-03-30 Thread Tim Golden
On 30/03/2016 11:07, Sven R. Kunze wrote: > On 30.03.2016 01:29, Eric S. Johansson wrote: >> >> >> On 3/29/2016 6:05 AM, Sven R. Kunze wrote: >>> >>> Python = English >>> >> As someone who writes English text and code using speech recognition, >> I can assure you that Python is not English. :-) >

Re: Learning Python (or Haskell) makes you a worse programmer

2016-03-30 Thread Sven R. Kunze
On 30.03.2016 01:29, Eric S. Johansson wrote: On 3/29/2016 6:05 AM, Sven R. Kunze wrote: Python = English As someone who writes English text and code using speech recognition, I can assure you that Python is not English. :-) :D Interesting. Never thought of how Python sounds when spoken.

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Antoon Pardon
Op 30-03-16 om 07:43 schreef Steven D'Aprano: > Yes, we're all very impressed that you spotted the trivial and obvious > loophole that changing a key:value will change the key:value that you just > changed *wink* but that doesn't really move the discussion anywhere. > > This is not an argument ab

Re: HELP! With calculating

2016-03-30 Thread Ben Finney
Yum Di writes: > I m still new at python. > Can someone please help me Welcome to Python! Please join our dedicated beginner forum, ‘python-tutor’ https://mail.python.org/mailman/listinfo/tutor>. > Hey, this is my code.. That's a lot of code to dump all at once. If you have a specific reques

  1   2   >