Create dictionary based of x items per key from two lists

wxjmfauth at gmail.com wxjmfauth at gmail.com
Tue Feb 3 02:13:06 EST 2015


Le dimanche 1 février 2015 20:37:14 UTC+1, Ian a écrit :
> On Sun, Feb 1, 2015 at 11:49 AM, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
> > On 01/02/2015 18:14, Grant Edwards wrote:
> >> A loop containing 1 line of code will execute in the same abount of
> >> time as that loop with 1 line of code and 99 blanks lines.
> >>
> >> The latter loop is running at 100 times as many lines/second as the
> >> former.   That's _got_ to be better.
> >>
> >
> > At long last my quest seeking the final entry for the Zen of Python is over.
> > I'll be delighted to let you accept the honour of raising an issue on the
> > bug tracker to get the "this" module changed to reflect my new found wisdom.
> 
> And while you're at it, please also work on changing the name of the
> module to "self" -- "this" is for Java.


>>> class C:
...     def __init__(carot, x):
...         carot.x = 999
...     def p(carot):
...         print(carot.x)
...         
>>> c = C(-1)
>>> c.p()
999
>>> 

"self" is not a keyword.

---

This will be very funny:

age_of_the_captain = int
def GetCommandantAge(i: age_of_the_captain)  -> age_of_the_captain:

Allowed?
age_of_the_captain = int
cardinal = int
BosonSpin = cardinal  # can be zero
def GetCommanderAge(i: age_of_the_captain)  -> BosonSpin:


Propose a clean language, instead of blaming those
who are writing bad code.




More information about the Python-list mailing list