Re: Ideas about how software should behave

2017-11-08 Thread Gregory Ewing
Chris Angelico wrote: I don't understand why you would use "yield from" as a synonym for "await". They are not equivalent. Why would you use one in place of the other? As far as I understand, currently the implementations of "yield from" and "await" are sufficiently similar that they *would* be

Re: converting numbers into words

2017-11-08 Thread jladasky
On Wednesday, November 8, 2017 at 10:51:35 PM UTC-8, r16...@rguktrkv.ac.in wrote: > How can I covert numbers into word like ex:-123 One hundred twenty three? That's a classic homework exercise. Expect guidance, not an answer. Why don't you solve a related, but simpler task first? This is a goo

converting numbers into words

2017-11-08 Thread r161637
How can I covert numbers into word like ex:-123 One hundred twenty three? -- https://mail.python.org/mailman/listinfo/python-list

Re: Ideas about how software should behave

2017-11-08 Thread Ben Finney
Marko Rauhamaa writes: > Jon Ribbens : > > It is my experience of this group/list that if one disagrees with any > > of you, Steve and Chris, you all rally round and gang up on that > > person to insult and belittle them. This makes the atmosphere quite > > hostile, and it would be quite remarkab

Re: Ideas about how software should behave

2017-11-08 Thread Ben Finney
Ned Batchelder writes: > On 11/8/17 5:22 PM, Ben Finney wrote: > > To say that someone is being arrogant simply is not an attack, and I > > really want you to see that. > Ben, this idea is really stupid! > > Be honest: when you read what I just wrote, did you feel a > dispassionate discussion sta

Re: Ideas about how software should behave

2017-11-08 Thread Marko Rauhamaa
Jon Ribbens : > It is my experience of this group/list that if one disagrees with any > of you, Steve and Chris, you all rally round and gang up on that > person to insult and belittle them. This makes the atmosphere quite > hostile, and it would be quite remarkable if it isn't hurting the > commun

Re: Ideas about how software should behave

2017-11-08 Thread Cameron Simpson
On 09Nov2017 05:29, Chris Angelico wrote: On Thu, Nov 9, 2017 at 5:18 AM, Jon Ribbens wrote: On 2017-11-08, Ben Finney wrote: I also think Jon had cause to bristle somewhat at the characterisation. I don't think Jon was attacked by Steve's remark, but I do sympathise with the instinct to fee

Re: Ideas about how software should behave

2017-11-08 Thread Ned Batchelder
On 11/8/17 5:22 PM, Ben Finney wrote: Jon Ribbens writes: On 2017-11-08, Ben Finney wrote: I also think Jon had cause to bristle somewhat at the characterisation. I don't think Jon was attacked by Steve's remark, but I do sympathise with the instinct to feel a criticism as an attack. Steve

Re: Ideas about how software should behave

2017-11-08 Thread Chris Angelico
On Thu, Nov 9, 2017 at 9:22 AM, Ben Finney wrote: >> If you call an idea arrogant you are necessarily stating that the >> person espousing the idea is guilty of arrogance - that's what the >> word means. > > Yes: it describes the behaviour. It does not imply characterisation of > the person. > > T

Re: Ideas about how software should behave

2017-11-08 Thread Ben Finney
Jon Ribbens writes: > On 2017-11-08, Ben Finney wrote: > > I also think Jon had cause to bristle somewhat at the characterisation. > > I don't think Jon was attacked by Steve's remark, but I do sympathise > > with the instinct to feel a criticism as an attack. > > Steve called me arrogant, that'

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-08 Thread Ian Kelly
On Wed, Nov 8, 2017 at 11:34 AM, Chris Angelico wrote: > On Thu, Nov 9, 2017 at 5:20 AM, Ian Kelly wrote: >> On Wed, Nov 8, 2017 at 11:12 AM, Chris Angelico wrote: >>> Except that "yield from" is used by generators to delegate to other >>> generators, and "await" is used by coroutines to delegat

Re: Ideas about how software should behave

2017-11-08 Thread Chris Angelico
On Thu, Nov 9, 2017 at 6:44 AM, Michael Torrie wrote: > This reminds me of a classic video clip from a few years ago. The new > Microsoft "We Share Your Pain" program. > > https://www.youtube.com/watch?v=D28FkfJiauk I've never actually seen this before. That's awesome! Thanks for sharing :) Chr

Re: Any good explanations on pd.merge(df,df2, on=['Code', 'Region'])

2017-11-08 Thread William Ayd
Assuming df and df2 are dataframes you are essentially doing a SQL-like join of the two objects where the records within match on both the Code and Region columns Sent from my iPhone -- https://mail.python.org/mailman/listinfo/python-list

Re: Ideas about how software should behave

2017-11-08 Thread Michael Torrie
On 11/08/2017 11:29 AM, Chris Angelico wrote: > If that's true, then it's not possible for software to be > "opinionated" either, because that definitely implies something human. > And it's illogical to say "Windows is feeling cranky today" when > something inexplicably fails. Nor should you talk a

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-08 Thread Chris Angelico
On Thu, Nov 9, 2017 at 5:20 AM, Ian Kelly wrote: > On Wed, Nov 8, 2017 at 11:12 AM, Chris Angelico wrote: >> Except that "yield from" is used by generators to delegate to other >> generators, and "await" is used by coroutines to delegate to other >> coroutines. In an asynchronous generator, "yiel

Re: Ideas about how software should behave

2017-11-08 Thread Chris Angelico
On Thu, Nov 9, 2017 at 5:18 AM, Jon Ribbens wrote: > On 2017-11-08, Ben Finney wrote: >> I also think Jon had cause to bristle somewhat at the characterisation. >> I don't think Jon was attacked by Steve's remark, but I do sympathise >> with the instinct to feel a criticism as an attack. > > Stev

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-08 Thread Ian Kelly
On Wed, Nov 8, 2017 at 11:12 AM, Chris Angelico wrote: > On Thu, Nov 9, 2017 at 5:05 AM, Ian Kelly wrote: >> On Wed, Nov 8, 2017 at 9:31 AM, Chris Angelico wrote: >>> On Thu, Nov 9, 2017 at 3:19 AM, Ian Kelly wrote: I was not referring to the possible future use of yield from for async >>>

Re: Ideas about how software should behave

2017-11-08 Thread Jon Ribbens
On 2017-11-08, Ben Finney wrote: > I also think Jon had cause to bristle somewhat at the characterisation. > I don't think Jon was attacked by Steve's remark, but I do sympathise > with the instinct to feel a criticism as an attack. Steve called me arrogant, that's an attack - never mind that he

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-08 Thread Chris Angelico
On Thu, Nov 9, 2017 at 5:05 AM, Ian Kelly wrote: > On Wed, Nov 8, 2017 at 9:31 AM, Chris Angelico wrote: >> On Thu, Nov 9, 2017 at 3:19 AM, Ian Kelly wrote: >>> I was not referring to the possible future use of yield from for async >>> generators; I was referring to the possibility *today* of us

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-08 Thread Ian Kelly
On Wed, Nov 8, 2017 at 9:31 AM, Chris Angelico wrote: > On Thu, Nov 9, 2017 at 3:19 AM, Ian Kelly wrote: >> I was not referring to the possible future use of yield from for async >> generators; I was referring to the possibility *today* of using "yield >> from" as a synonym for *await*. As far as

Re: dictionary comparing int keys and joins their values if two key are within a certain distance

2017-11-08 Thread Peter Otten
Daiyue Weng wrote: > I have a nested dictionary of defaultdict(dict) whose sub dict have int > keys and lists (list of ints) as values, > > 'A' = {2092: [1573], 2093: [1576, 1575], 2094: [1577], 2095: > [1574]}'B' = {2098: [1], 2099: [2, 3], 2101: [4], 2102: [5]}'C' = > {2001: [6], 2003: [7, 8],

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-08 Thread Chris Angelico
On Thu, Nov 9, 2017 at 3:19 AM, Ian Kelly wrote: > I was not referring to the possible future use of yield from for async > generators; I was referring to the possibility *today* of using "yield > from" as a synonym for *await*. As far as I know the only major > obstacle to that is that the author

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-08 Thread Ian Kelly
On Tue, Nov 7, 2017 at 2:42 PM, Chris Angelico wrote: > On Wed, Nov 8, 2017 at 8:16 AM, Ian Kelly wrote: >>> Not one of these is syntactically invalid. Why should "else without >>> break" be trapped by the parser? Your other examples mostly have good >>> parser-level reasons for being errors >> >

import issues python3.4

2017-11-08 Thread Heli
Dear all, I have a software code that is written in python and has a structure like this. package/ run_my_gui.py#gui sub_package/ main.py sub_sub_package/ __init__.py A.py B.py C.py All the imports in main.py are absolute and look lik

Re: Calling of GetVolumeInformation returns empty serial number

2017-11-08 Thread Durumdara
Hello! Eryk, your solution is the best solution for me: os.stat(drive).st_dev I don't need the real ID. I write a Recycle Bin manager in Python - for my machine only. It just simply registers all rec. bin files to an SQLite DB (only the new ones with a date). After 30 days it deletes too old

dictionary comparing int keys and joins their values if two key are within a certain distance

2017-11-08 Thread Daiyue Weng
I have a nested dictionary of defaultdict(dict) whose sub dict have int keys and lists (list of ints) as values, 'A' = {2092: [1573], 2093: [1576, 1575], 2094: [1577], 2095: [1574]}'B' = {2098: [1], 2099: [2, 3], 2101: [4], 2102: [5]}'C' = {2001: [6], 2003: [7, 8], 2004: [9], 2005: [10]} I union

Re: Any good explanations on pd.merge(df,df2, on=['Code', 'Region'])

2017-11-08 Thread Paul Moore
On 8 November 2017 at 11:15, Karsten Hilbert wrote: > On Wed, Nov 08, 2017 at 09:26:04AM +, David Shi via Python-list wrote: > >> I am trying to gain a clear understanding on pd.merge(df,df2, on=['Code', >> 'Region']). >> Can anyone assist? > > ncq@hermes:~$ python > Python 2

Re: Ideas about how software should behave

2017-11-08 Thread Ben Finney
Ned Batchelder writes: > All of this could have been avoided.  Steve called an idea arrogant. > Jon felt that Steve was calling him arrogant. If Steve had simply > said, "I'm sorry, I didn't mean that to apply to you," we wouldn't be > here now. Why is it so hard to treat people as if they matter

Re: Any good explanations on pd.merge(df,df2, on=['Code', 'Region'])

2017-11-08 Thread Karsten Hilbert
On Wed, Nov 08, 2017 at 09:26:04AM +, David Shi via Python-list wrote: > I am trying to gain a clear understanding on pd.merge(df,df2, on=['Code', > 'Region']). > Can anyone assist? ncq@hermes:~$ python Python 2.7.14 (default, Sep 17 2017, 18:50:44) [GCC 7.2.0] on li

Any good explanations on pd.merge(df,df2, on=['Code', 'Region'])

2017-11-08 Thread David Shi via Python-list
I am trying to gain a clear understanding on pd.merge(df,df2, on=['Code', 'Region']). Can anyone assist? Regards, David -- https://mail.python.org/mailman/listinfo/python-list