Re: [newbie] making rows of table with discrete values for different number systems

2014-02-04 Thread Jean Dupont
Op maandag 3 februari 2014 20:50:04 UTC+1 schreef Asaf Las: > On Monday, February 3, 2014 9:37:36 PM UTC+2, Jean Dupont wrote: > > Op maandag 3 februari 2014 16:34:18 UTC+1 schreef Asaf Las: > > > > Of course you don't have to, but I'm curious and learn well by examples > > :-( > > Hi Jean > > Do

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-03 Thread Rustom Mody
On Tuesday, February 4, 2014 3:20:06 AM UTC+5:30, Terry Reedy wrote: > name = lambda xxx is poor style because it produces a function object > lacking a proper name. Reusing the function name as a local is also > confusing. The above is equivalent to > def m(k, n): return 1 if k & n else 0 Yeah

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-03 Thread Denis McMahon
On Sun, 02 Feb 2014 09:44:05 -0800, Jean Dupont wrote: > I'm looking for an efficient method to produce rows of tables like this: > > for base 2 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 . > . > . > 1 1 1 1 > > for base 3 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 0 1 1 0 > 0 0 0 1 2 .

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-03 Thread Terry Reedy
On 2/3/2014 10:05 AM, Jean Dupont wrote: Op maandag 3 februari 2014 02:56:43 UTC+1 schreef Asaf Las: On Sunday, February 2, 2014 10:51:15 PM UTC+2, Jean Dupont wrote: Op zondag 2 februari 2014 19:10:32 UTC+1 schreef Peter Otten: I'm looking for an efficient method to produce rows of tables lik

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-03 Thread Asaf Las
On Monday, February 3, 2014 9:37:36 PM UTC+2, Jean Dupont wrote: > Op maandag 3 februari 2014 16:34:18 UTC+1 schreef Asaf Las: > > Of course you don't have to, but I'm curious and learn well by examples > > :-( And making this design generic is really a good example indeed. -- https://mail.pyt

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-03 Thread Asaf Las
On Monday, February 3, 2014 9:37:36 PM UTC+2, Jean Dupont wrote: > Op maandag 3 februari 2014 16:34:18 UTC+1 schreef Asaf Las: > > Of course you don't have to, but I'm curious and learn well by examples > :-( Hi Jean Don't get me wrong i did not mean to be rude (was joking) - i think if you wi

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-03 Thread Jean Dupont
Op maandag 3 februari 2014 16:34:18 UTC+1 schreef Asaf Las: > On Monday, February 3, 2014 5:05:40 PM UTC+2, Jean Dupont wrote: > > Op maandag 3 februari 2014 02:56:43 UTC+1 schreef Asaf Las: > > > > > On Sunday, February 2, 2014 10:51:15 PM UTC+2, Jean Dupont wrote: > > > > Op zondag 2 februari 20

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-03 Thread Asaf Las
On Monday, February 3, 2014 5:05:40 PM UTC+2, Jean Dupont wrote: > Op maandag 3 februari 2014 02:56:43 UTC+1 schreef Asaf Las: > > > On Sunday, February 2, 2014 10:51:15 PM UTC+2, Jean Dupont wrote: > > > Op zondag 2 februari 2014 19:10:32 UTC+1 schreef Peter Otten: > > > I'm looking for an effici

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-03 Thread Jean Dupont
Op zondag 2 februari 2014 19:07:38 UTC+1 schreef Roy Smith: > In article <515e582f-ed17-4d4e-9872-f07f1fda6...@googlegroups.com>, > Jean Dupont wrote: > > > I'm looking for an efficient method to produce rows of tables like this: > > > > for base 2 > > 0 0 0 0 > > 0 0 0 1 > > 0 0 1 0 > > 0 0 1 1

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-03 Thread Jean Dupont
Op maandag 3 februari 2014 02:56:43 UTC+1 schreef Asaf Las: > On Sunday, February 2, 2014 10:51:15 PM UTC+2, Jean Dupont wrote: > > Op zondag 2 februari 2014 19:10:32 UTC+1 schreef Peter Otten: > > > > I'm looking for an efficient method to produce rows of tables like this: > > jean > you can als

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-02 Thread Asaf Las
On Sunday, February 2, 2014 10:51:15 PM UTC+2, Jean Dupont wrote: > Op zondag 2 februari 2014 19:10:32 UTC+1 schreef Peter Otten: > > I'm looking for an efficient method to produce rows of tables like this: > jean you can also try to make below universal for all needed bases: m = lambda m, n:

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-02 Thread Jean Dupont
Op zondag 2 februari 2014 19:10:32 UTC+1 schreef Peter Otten: > Jean Dupont wrote: > > > I'm looking for an efficient method to produce rows of tables like this: > > > > for base 2 > > 0 0 0 0 > > 0 0 0 1 > > 0 0 1 0 > > 0 0 1 1 > > 0 1 0 0 > > . > > . > > . > > 1 1 1 1 > > > > for base 3 > > 0 0

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-02 Thread Peter Otten
Jean Dupont wrote: > I'm looking for an efficient method to produce rows of tables like this: > > for base 2 > 0 0 0 0 > 0 0 0 1 > 0 0 1 0 > 0 0 1 1 > 0 1 0 0 > . > . > . > 1 1 1 1 > > for base 3 > 0 0 0 0 0 0 > 0 0 0 0 0 1 > 0 0 0 0 0 2 > 0 0 0 0 1 0 > 0 0 0 0 1 1 > 0 0 0 0 1 2 > . > . > 2 2 2

Re: [newbie] making rows of table with discrete values for different number systems

2014-02-02 Thread Roy Smith
In article <515e582f-ed17-4d4e-9872-f07f1fda6...@googlegroups.com>, Jean Dupont wrote: > I'm looking for an efficient method to produce rows of tables like this: > > for base 2 > 0 0 0 0 > 0 0 0 1 > 0 0 1 0 > 0 0 1 1 > 0 1 0 0 > . > . > . > 1 1 1 1 > > for base 3 > 0 0 0 0 0 0 > 0 0 0 0 0 1 >

[newbie] making rows of table with discrete values for different number systems

2014-02-02 Thread Jean Dupont
I'm looking for an efficient method to produce rows of tables like this: for base 2 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 . . . 1 1 1 1 for base 3 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 2 . . 2 2 2 2 2 2 As you can see the rows are always twice the size of the ba