Re: Python help needed

2019-08-07 Thread MRAB
On 2019-08-07 21:36, Kuyateh Yankz wrote: #trying to write a function that takes a list value as an argument and returns a string with all the items separated by a comma and a space, with and inserted before the last item. For example, passing the previous spam list to the function would return

Python help needed

2019-08-07 Thread Kuyateh Yankz
#trying to write a function that takes a list value as an argument and returns a string with all the items separated by a comma and a space, with and inserted before the last item. For example, passing the previous spam list to the function would return 'apples, bananas, tofu, and cats'. But y

Re: Trouble installing python

2019-08-07 Thread Sanford Lefkowitz
I have basically the same question. have you found an answer yet? -- https://mail.python.org/mailman/listinfo/python-list

Re: class definition question

2019-08-07 Thread Terry Reedy
On 8/7/2019 3:26 PM, Manfred Lotz wrote: On Wed, 07 Aug 2019 14:39:00 -0400 Dennis Lee Bieber wrote: On Wed, 7 Aug 2019 20:11:15 +0200, Manfred Lotz declaimed the following: Hi there, More often I see something like this: class Myclass: ... but sometimes I see class Myclass(object): ...

Re: class definition question

2019-08-07 Thread Manfred Lotz
On Wed, 07 Aug 2019 14:39:00 -0400 Dennis Lee Bieber wrote: > On Wed, 7 Aug 2019 20:11:15 +0200, Manfred Lotz > declaimed the following: > > >Hi there, > >More often I see something like this: > > > >class Myclass: > >... > > > > > >but sometimes I see > > > >class Myclass(object): > >... > > >

class definition question

2019-08-07 Thread Manfred Lotz
Hi there, More often I see something like this: class Myclass: ... but sometimes I see class Myclass(object): ... Question: which way is preferable? -- Manfred -- https://mail.python.org/mailman/listinfo/python-list

Re: [poliastro-dev] ANN: poliastro 0.13.0 released ????

2019-08-07 Thread Oleg Broytman
Can I ask you to remove python-announce from the list of addresses? It's not a mailing list for discussions. On Wed, Aug 07, 2019 at 06:16:43PM +0200, Samuel Leli??vre wrote: > Le mar. 6 ao??t 2019 ?? 08:33, Samuel Dupree a ??crit > : > > > Juan Luis Cano, > > > > When will poliastro ver. 0.1

Re: For the code to generate `zen of python'.

2019-08-07 Thread Thomas Jollans
On 07/08/2019 15.11, Hongyi Zhao wrote: > Hi here, > > I noticed that the `zen of python' is generated by the following code: > > d = {} > for c in (65, 97): > for i in range(26): > d[chr(i+c)] = chr((i+13) % 26 + c) > > print("".join([d.get(c, c) for c in s])) > > > But the above code

Re: For the code to generate `zen of python'.

2019-08-07 Thread Paul Moore
It's basically a decryption of the string s in the same module, that's encoded using the ROT13 algorithm - https://en.wikipedia.org/wiki/ROT13. This isn't meant to be secure, it's basically a little bit of fun obfuscating the actual text. The code creates a dictionary mapping encoded characters to

For the code to generate `zen of python'.

2019-08-07 Thread Hongyi Zhao
Hi here, I noticed that the `zen of python' is generated by the following code: d = {} for c in (65, 97): for i in range(26): d[chr(i+c)] = chr((i+13) % 26 + c) print("".join([d.get(c, c) for c in s])) But the above code is not so easy for me to figure out. Could someone please g