Re: From parsing a class to code object to class to mappingproxy to object (oh my!)

2019-04-05 Thread adam . preble
On Friday, April 5, 2019 at 5:54:42 PM UTC-5, Gregory Ewing wrote: > But when compiling a class body, it uses a dict to hold the > locals, and generates LOAD_NAME and STORE_NAME opcodes to > access it. > > These opcodes actually date from very early versions of > Python, when locals were always ke

Re: hello this ali .. i want some question about python

2019-04-05 Thread Igor Korot
Hi, On Fri, Apr 5, 2019 at 9:02 PM Sayth Renshaw wrote: > > On Saturday, 6 April 2019 08:21:51 UTC+11, maak khan wrote: > > i need your help guys .. plz Are you trying to create a teaching software? Thank you. > > With? > -- > https://mail.python.org/mailman/listinfo/python-list -- https://m

hello this ali .. i want some question about python

2019-04-05 Thread maak khan
i need your help guys .. plz -- https://mail.python.org/mailman/listinfo/python-list

Re: hello this ali .. i want some question about python

2019-04-05 Thread Sayth Renshaw
On Saturday, 6 April 2019 08:21:51 UTC+11, maak khan wrote: > i need your help guys .. plz With? -- https://mail.python.org/mailman/listinfo/python-list

Re: Getting file extensions [linux fs]

2019-04-05 Thread Pablo Lucena
Have you looked into eBPF? They have mature Python bindings. It makes interacting with the kernel as efficient as possible - you can run it in production at high resolutions without putting things at risk. One of the benefits - any averaging / aggregation / histograms / etc can be done by the kerne

Re: From parsing a class to code object to class to mappingproxy to object (oh my!)

2019-04-05 Thread Gregory Ewing
adam.pre...@gmail.com wrote: Something I don't really understand from a code generation perspective is the switch over to STORE_NAME for class methods. That's because, in this particular situation, the locals are being kept in a dict instead of an array. When compiling an ordinary function, th

Re: I really liked this Javscript FizzBuzz can it be as nice in Python?

2019-04-05 Thread Sayth Renshaw
Wow in both of these examples I have no idea what is happening. Enjoying trying to figure it out :-) > print(*[[n,"Fizz","Buzz","Fizzbuzz"][int("300102100120100"[n%15])] for > n in range(1,101)], sep="\n") > This is not good code, and if anyone asks, I didn't say you were > allowed to do this

Re: I really liked this Javscript FizzBuzz can it be as nice in Python?

2019-04-05 Thread Peter Otten
Sayth Renshaw wrote: > I saw this fizzbuzz in Eloquent Javascript and thought its really nice. > Not all the usual if else version, just if. > > for (let n = 1; n <= 100; n++) { > let output = ""; > if (n % 3 == 0) output += "Fizz"; > if (n % 5 == 0) output += "Buzz"; > console.log(output

Re: I really liked this Javscript FizzBuzz can it be as nice in Python?

2019-04-05 Thread Terry Reedy
On 4/5/2019 2:52 AM, Sayth Renshaw wrote: for (let n = 1; n <= 100; n++) { n = range(100) n = range(1, 101) to cover 1 to 100 inclusive -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Logging cf Reporting = Friday Filosofical Finking

2019-04-05 Thread Ben Coleman
On 4/4/2019 3:34 PM, DL Neil wrote: > ("oh, and it would be nice if you could send the file to me by email..." > - they're always, um, never, (quite) satisfied...) I refer to this as the Heisenberg Principle of computer programming: the act of giving a user what he says he wants changes what he wa

Re: I really liked this Javscript FizzBuzz can it be as nice in Python?

2019-04-05 Thread Chris Angelico
On Fri, Apr 5, 2019 at 5:56 PM Sayth Renshaw wrote: > > I saw this fizzbuzz in Eloquent Javascript and thought its really nice. Not > all the usual if else version, just if. > > for (let n = 1; n <= 100; n++) { > let output = ""; > if (n % 3 == 0) output += "Fizz"; > if (n % 5 == 0) output