Re: Reposting On Python-List PROHIBITED

2016-11-23 Thread Steve D'Aprano
On Thu, 24 Nov 2016 10:28 am, Lawrence D’Oliveiro wrote: > To the controllers of Python-List: > > I never asked to be on your list. I never consented to having my postings > appear on your list. And I certainly didn’t agree to any conditions you > might impose on members on your list. comp.lang.

Re: Reposting On Python-List PROHIBITED

2016-11-23 Thread Michael Torrie
On 11/23/2016 04:31 PM, mm0fmf wrote: > On 23/11/2016 23:28, Lawrence D’Oliveiro wrote: >> Therefore, to see you take offence at something I said, and use >> that as an excuse to “ban” me from your list, is an act of >> breathtaking hypocrisy. As far as I am concerned, it is you lot who >> should b

Re: Reposting On Python-List PROHIBITED

2016-11-23 Thread mm0fmf
On 23/11/2016 23:28, Lawrence D’Oliveiro wrote: To the controllers of Python-List: I never asked to be on your list. I never consented to having my postings appear on your list. And I certainly didn’t agree to any conditions you might impose on members on your list. Therefore, to see you take

Re: while loop (Reposting On Python-List Prohibited)

2016-10-12 Thread BartC
On 12/10/2016 11:15, Peter Otten wrote: BartC wrote: On 12/10/2016 05:30, Lawrence D’Oliveiro wrote: On Wednesday, October 12, 2016 at 11:23:48 AM UTC+13, BartC wrote: while n>=x: n=n-1 print "*"* n else: print ("2nd loop exit n=",n,"x=",x) What is the difference between that

Re: while loop (Reposting On Python-List Prohibited)

2016-10-12 Thread Peter Otten
BartC wrote: > On 12/10/2016 05:30, Lawrence D’Oliveiro wrote: >> On Wednesday, October 12, 2016 at 11:23:48 AM UTC+13, BartC wrote: >>> while n>=x: >>> n=n-1 >>> print "*"* n >>> else: >>> print ("2nd loop exit n=",n,"x=",x) >> >> What is the difference between that and >> >> w

Re: while loop (Reposting On Python-List Prohibited)

2016-10-12 Thread BartC
On 12/10/2016 05:30, Lawrence D’Oliveiro wrote: On Wednesday, October 12, 2016 at 11:23:48 AM UTC+13, BartC wrote: while n>=x: n=n-1 print "*"* n else: print ("2nd loop exit n=",n,"x=",x) What is the difference between that and while n>=x: n=n-1 print "*"*

Re: while loop (Reposting On Python-List Prohibited)

2016-10-11 Thread BartC
On 11/10/2016 22:26, Lawrence D’Oliveiro wrote: On Wednesday, October 12, 2016 at 6:58:46 AM UTC+13, dhawan...@gmail.com wrote: Only first loop is executing not the second one? n=6 x=1 while x<=n: print("*"*x) x+=1 print('n=', n)

Re: static, class and instance methods (Reposting On Python-List Prohibited)

2016-10-06 Thread ast
"Gregory Ewing" a écrit dans le message de news:e5mgi9fp1b...@mid.individual.net... Lawrence D’Oliveiro wrote: Every function is already a descriptor. Which you can see with a simple experiment: >>> def f(self): ... print("self =", self) ... I thought yesterday that every thing was cle

Re: static, class and instance methods (Reposting On Python-List Prohibited)

2016-10-06 Thread ast
"Steve D'Aprano" a écrit dans le message de news:57f6673a$0$1598$c3e8da3$54964...@news.astraweb.com... On Thu, 6 Oct 2016 08:03 pm, ast wrote: Consider this function: def add(a, b): return a+b You say that a function is always stored as a descriptor object, so when I execute sum = f(4

Re: static, class and instance methods (Reposting On Python-List Prohibited)

2016-10-06 Thread Steve D'Aprano
On Thu, 6 Oct 2016 08:03 pm, ast wrote: > Consider this function: > > def add(a, b): > return a+b > > You say that a function is always stored as > a descriptor object, so when I execute > > sum = f(4, 6) > > from which class it is supposed to come from ? It doesn't. The descriptor proto

Re: static, class and instance methods (Reposting On Python-List Prohibited)

2016-10-06 Thread Peter Otten
ast wrote: > > "Lawrence D’Oliveiro" a écrit dans le message de > news:f5314bdd-a98f-4a16-b546-bd8efe4dd...@googlegroups.com... >> On Thursday, October 6, 2016 at 7:54:08 PM UTC+13, ast wrote: >>> But there is no decorator, why ? Is python doing the conversion >>> of funct2 to a descriptor itsel

Re: static, class and instance methods (Reposting On Python-List Prohibited)

2016-10-06 Thread ast
"Lawrence D’Oliveiro" a écrit dans le message de news:f5314bdd-a98f-4a16-b546-bd8efe4dd...@googlegroups.com... On Thursday, October 6, 2016 at 7:54:08 PM UTC+13, ast wrote: But there is no decorator, why ? Is python doing the conversion of funct2 to a descriptor itself, behind the scene ? E

Re: static, class and instance methods (Reposting On Python-List Prohibited)

2016-10-06 Thread Gregory Ewing
Lawrence D’Oliveiro wrote: Every function is already a descriptor. Which you can see with a simple experiment: >>> def f(self): ... print("self =", self) ... >>> g = f.__get__(17, None) >>> g >>> g() self = 17 -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: 'str' object has no attribute 'intersection' and unhashable set (Reposting On Python-List Prohibited)

2016-10-05 Thread Ho Yeung Lee
i do not understand, how to solve this frozonset ? Lawrence D’Oliveiro於 2016年10月5日星期三 UTC+8下午2時24分13秒寫道: > On Wednesday, October 5, 2016 at 2:35:25 PM UTC+13, meInvent bbird wrote: > > it return unhashable type 'set' > > This is what “frozenset” is for--it’s the immutable counterpart of “set”.

Re: how to read linux kernel source with pycparser (Reposting On Python-List Prohibited)

2016-10-04 Thread meInvent bbird
yes, i searched in google between 2011 and 2012 descending for loop is faster than ascending for loop On Wednesday, October 5, 2016 at 9:48:41 AM UTC+8, Chris Angelico wrote: > On Wed, Oct 5, 2016 at 12:41 PM, meInvent bbird wrote: > > so far i do not know which bug i search for > > > > i would

Re: how to read linux kernel source with pycparser (Reposting On Python-List Prohibited)

2016-10-04 Thread Chris Angelico
On Wed, Oct 5, 2016 at 12:41 PM, meInvent bbird wrote: > so far i do not know which bug i search for > > i would like to change style of for loop > > form ascending to descending style > > for(int i=0; i<3; ++i) > > to > > for(int i=3; i>=0; --i) > > or > > most crazy to change if else if else int

Re: how to read linux kernel source with pycparser (Reposting On Python-List Prohibited)

2016-10-04 Thread meInvent bbird
On Wednesday, October 5, 2016 at 2:34:49 AM UTC+8, Lawrence D’Oliveiro wrote: > On Tuesday, October 4, 2016 at 10:38:14 PM UTC+13, meInvent bbird wrote: > > how to customize pycparser to search what we want such as bug > > What kind of bug do you want to search for? so far i do not know which bu