Old Man Yells At Cloud

2017-09-15 Thread Steve D'Aprano
/rant on So apparently everyone who disagrees that Python should be more like Javascript is an old greybeard fuddy-duddy yelling "Get off my lawn!" to the cool kids -- and is also too stupid to know how dumb they are. "Hi, I've been programming in Python for what seems like days now, and here's a

Re: Which database system?

2017-09-15 Thread Chris Angelico
On Sat, Sep 16, 2017 at 11:37 AM, Steve D'Aprano wrote: > On Sat, 16 Sep 2017 04:24 am, Chris Angelico wrote: > >> but switching your dict/list system to be >> disk-backed is a lot harder. > > import shelve > > :-) > > > > Now you have two problems :-) > Yeah, like: How do you do a query (anythin

Re: Standard for dict-contants with duplicate keys?

2017-09-15 Thread Tim Chase
On 2017-09-15 17:45, Terry Reedy wrote: > On 9/15/2017 3:36 PM, Tim Chase wrote: > >d = { > > "a": 0, > > "a": 1, > > "a": 2, > >} > > > > In my limited testing, it appears to always take the last one, > > resulting in > > > >{"a": 2} > > > > Is this guaranteed

Re: Which database system?

2017-09-15 Thread Michael Torrie
On 09/15/2017 03:10 PM, Dennis Lee Bieber wrote: > "single table" so no join logic needed. And I suspect the relational > algebra "project" would be considered the same as SQL "select" by most > folks As Stefan has said, it's sometimes useful to join a table with itself, though I have neve

Re: Which database system?

2017-09-15 Thread Steve D'Aprano
On Sat, 16 Sep 2017 04:24 am, Chris Angelico wrote: > but switching your dict/list system to be > disk-backed is a lot harder. import shelve :-) Now you have two problems :-) -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things got worse. --

Re: String to Dictionary conversion in python

2017-09-15 Thread Rustom Mody
On Saturday, September 16, 2017 at 2:04:39 AM UTC+5:30, jlad...@itu.edu wrote: > On Thursday, September 14, 2017 at 11:33:56 PM UTC-7, Ian wrote: > > On Fri, Sep 15, 2017 at 12:01 AM, wrote: > > > Hi, > > > > > > Can anyone help me in the below issue. > > > > > > I need to convert string to dicti

Re: How do I check all variables returned buy the functions exists

2017-09-15 Thread Steve D'Aprano
On Sat, 16 Sep 2017 01:43 am, Ganesh Pal wrote: > I have a function that return's x variables How do I check if all the the > values returned are not None/False/0/'' [...] > value1, value2 , value3 = return_x_values() > > > # check if its not none > > # I think this can be better > if value1

Re: Standard for dict-contants with duplicate keys?

2017-09-15 Thread Serhiy Storchaka
16.09.17 00:45, Terry Reedy пише: On 9/15/2017 3:36 PM, Tim Chase wrote: Looking through docs, I was unable to tease out whether there's a prescribed behavior for the results of defining a dictionary with the same keys multiple times d = { "a": 0, "a": 1, "a": 2, }

Re: ttk.Notebook Tabs Question

2017-09-15 Thread Wildman via Python-list
On Fri, 15 Sep 2017 20:45:20 +0100, MRAB wrote: > On 2017-09-15 16:24, Wildman via Python-list wrote: >> On Fri, 15 Sep 2017 06:09:21 +0400, Abdur-Rahmaan Janhangeer wrote: >> >>> try >>> widget["width"] it returns string >>> then mult by no. of tabs >> >> Since the tabs are displaying text, I b

Re: Standard for dict-contants with duplicate keys?

2017-09-15 Thread Peter Otten
Tim Chase wrote: > Looking through docs, I was unable to tease out whether there's a > prescribed behavior for the results of defining a dictionary with the > same keys multiple times > > d = { > "a": 0, > "a": 1, > "a": 2, > } > > In my limited testing, it appears to alwa

Re: Standard for dict-contants with duplicate keys?

2017-09-15 Thread Terry Reedy
On 9/15/2017 3:36 PM, Tim Chase wrote: Looking through docs, I was unable to tease out whether there's a prescribed behavior for the results of defining a dictionary with the same keys multiple times d = { "a": 0, "a": 1, "a": 2, } In my limited testing, it appears t

Standard for dict-contants with duplicate keys?

2017-09-15 Thread Tim Chase
Looking through docs, I was unable to tease out whether there's a prescribed behavior for the results of defining a dictionary with the same keys multiple times d = { "a": 0, "a": 1, "a": 2, } In my limited testing, it appears to always take the last one, resulting in {"

Re: String to Dictionary conversion in python

2017-09-15 Thread jladasky
On Thursday, September 14, 2017 at 11:33:56 PM UTC-7, Ian wrote: > On Fri, Sep 15, 2017 at 12:01 AM, wrote: > > Hi, > > > > Can anyone help me in the below issue. > > > > I need to convert string to dictionary > > > > string = " 'msisdn': '7382432382', 'action': 'select', 'sessionId': '123', > >

Re: Basic Lotus 1-2-3 worksheet creation class for Python

2017-09-15 Thread geoffrey . eisenbarth
I just wanted to let you now that as someone whose boss prefers to use WK1 in 2017, this is going to save my life. Thanks :) About to try this out, if I have to do anything to get it to work with Python3 I'll post the changes here later. -- https://mail.python.org/mailman/listinfo/python-list

Re: ttk.Notebook Tabs Question

2017-09-15 Thread MRAB
On 2017-09-15 16:24, Wildman via Python-list wrote: On Fri, 15 Sep 2017 06:09:21 +0400, Abdur-Rahmaan Janhangeer wrote: try widget["width"] it returns string then mult by no. of tabs Since the tabs are displaying text, I believe the width would be returned as characters or letters like a Butt

Re: Test Bank for Governing Texas, 3rd Edition by Champagne Harpham

2017-09-15 Thread andrey . estrada2
On Sunday, July 9, 2017 at 5:58:45 AM UTC-6, Test Banks wrote: > Greetings, > > You can get Test Bank for " Governing Texas, 3rd Edition by Anthony > Champagne, Edward J. Harpham, Jason P. Casellas " at very reasonable price. > Our team is available 24/7 and 365 days / year to respond your requ

Re: Question about modules documentation

2017-09-15 Thread Tobiah
>> 'next sentence' is the operative piece. I think that if the bit >> about placement was moved to the end of the paragraph the whole >> thing would be more readable and I wouldn't have stumbled on it. > > If it had meant "the imported module's names" or indeed "the imported > modules' names", I

Re: Which database system?

2017-09-15 Thread Michael Torrie
On 09/15/2017 12:04 PM, Stefan Ram wrote: > When one is building an in-memory database that has a single > table that is built at the start of the program and then one > writes some complex queries to the table, what can be expected ^^ How do you pla

Re: Which database system?

2017-09-15 Thread Chris Angelico
On Sat, Sep 16, 2017 at 4:04 AM, Stefan Ram wrote: > When one is building an in-memory database that has a single > table that is built at the start of the program and then one > writes some complex queries to the table, what can be expected > to be faster: > > - implementing the table

Re: Question about modules documentation

2017-09-15 Thread Rhodri James
On 15/09/17 18:05, Tobiah wrote: On 09/15/2017 09:25 AM, Stefan Ram wrote:> Tobiah writes: Modules can import other modules. It is customary but not required to place all import statements at the beginning of a module (or script, for that matter). The imported mo

Re: Question about modules documentation

2017-09-15 Thread Tobiah
On 09/15/2017 09:25 AM, Stefan Ram wrote:> Tobiah writes: >> Modules can import other modules. It is customary but not >> required to place all import statements at the beginning >> of a module (or script, for that matter). The imported >> module names are placed > .. >> When i

Re: Question about modules documentation

2017-09-15 Thread Tobiah
Re-reading I guess the plural refers to the multiple modules referenced in the first sentence. It was probably written that way before someone inserted the bit about the customary placement, which greatly clouds the connection. On 09/15/2017 09:03 AM, Tobiah wrote: > In this doc: > > ht

Re: Merging pdf files based on a value in a field

2017-09-15 Thread accessnewbie
Suggestions to use pyPDF2 to append files did not pan out. I had to go with the arcpy module. pyPDF2 does NOT merge correctly when trying to output multiple files based on a a similar value or key (essentially the group by concept). import csv import arcpy from arcpy import env

Re: How do I check all variables returned buy the functions exists

2017-09-15 Thread Rob Gaddi
On 09/15/2017 08:43 AM, Ganesh Pal wrote: I have a function that return's x variables How do I check if all the the values returned are not None/False/0/'' Here is the same program to demonstrate this , but I felt this can be better any suggestions ? # vi file.py import random import stri

Re: Question about modules documentation

2017-09-15 Thread Chris Angelico
On Sat, Sep 16, 2017 at 2:03 AM, Tobiah wrote: > It seems that if the statement read: > > the imported module's name (singular) is placed in the > importing module's global symbol table. > > That it would be more accurate. That implies that you only import one module. Consider: i

Question about modules documentation

2017-09-15 Thread Tobiah
In this doc: https://docs.python.org/2/tutorial/modules.html Near the top it states: Modules can import other modules. It is customary but not required to place all import statements at the beginning of a module (or script, for that matter). The imported m

How do I check all variables returned buy the functions exists

2017-09-15 Thread Ganesh Pal
I have a function that return's x variables How do I check if all the the values returned are not None/False/0/'' Here is the same program to demonstrate this , but I felt this can be better any suggestions ? # vi file.py import random import string def return_x_values(): " returns x

Re: ttk.Notebook Tabs Question

2017-09-15 Thread Wildman via Python-list
On Fri, 15 Sep 2017 06:09:21 +0400, Abdur-Rahmaan Janhangeer wrote: > try > widget["width"] it returns string > then mult by no. of tabs Since the tabs are displaying text, I believe the width would be returned as characters or letters like a Button or Text widget. I need pixels. Another proble

Re: The Incredible Growth of Python (stackoverflow.blog)(kdnuggets)

2017-09-15 Thread Vincent Vande Vyvre
Again an other review: http://www.kdnuggets.com/2017/08/python-overtakes-r-leader-analytics-data-science.html Vincent -- https://mail.python.org/mailman/listinfo/python-list