Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #85121

Re: Create dictionary based of x items per key from two lists

Newsgroups comp.lang.python
Date 2015-02-02 23:13 -0800
References (2 earlier) <mak57e$3pd$1@ger.gmane.org> <mailman.18347.1422760944.18130.python-list@python.org> <malqet$kf0$1@reader1.panix.com> <malsg0$6dh$1@ger.gmane.org> <mailman.18373.1422819423.18130.python-list@python.org>
Message-ID <56384fa2-e2a7-430d-ab2d-e878bedaa15a@googlegroups.com> (permalink)
Subject Re: Create dictionary based of x items per key from two lists
From wxjmfauth@gmail.com

Show all headers | View raw


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@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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Create dictionary based of x items per key from two lists rajanbond@gmail.com - 2015-01-30 18:27 -0800
  Re: Create dictionary based of x items per key from two lists Chris Angelico <rosuav@gmail.com> - 2015-01-31 13:38 +1100
  Re: Create dictionary based of x items per key from two lists Jason Friedman <jsf80238@gmail.com> - 2015-01-31 19:38 -0700
    Re: Create dictionary based of x items per key from two lists rajanbond@gmail.com - 2015-02-02 10:48 -0800
    Re: Create dictionary based of x items per key from two lists rajanbond@gmail.com - 2015-02-02 11:00 -0800
  Re: Create dictionary based of x items per key from two lists Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-01 03:06 +0000
  Re: Create dictionary based of x items per key from two lists Chris Angelico <rosuav@gmail.com> - 2015-02-01 14:22 +1100
    Re: Create dictionary based of x items per key from two lists Grant Edwards <invalid@invalid.invalid> - 2015-02-01 18:14 +0000
      Re: Create dictionary based of x items per key from two lists Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-01 18:49 +0000
      Re: Create dictionary based of x items per key from two lists mm0fmf <none@mailinator.com> - 2015-02-01 18:52 +0000
      Re: Create dictionary based of x items per key from two lists Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-01 12:36 -0700
        Re: Create dictionary based of x items per key from two lists wxjmfauth@gmail.com - 2015-02-02 23:13 -0800
      Re: Create dictionary based of x items per key from two lists Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-01 20:28 +0000
      Re: Create dictionary based of x items per key from two lists Chris Angelico <rosuav@gmail.com> - 2015-02-02 07:33 +1100
  Re: Create dictionary based of x items per key from two lists Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-01 11:51 -0700

csiph-web