From fuzzyman at voidspace.org.uk Sun Jun 1 00:02:52 2014 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sat, 31 May 2014 23:02:52 +0100 Subject: [python-uk] TDD stuff in London, next two weeks (and list comprehension scoping) In-Reply-To: <5389AB4A.8040809@tartley.com> References: <5389AB4A.8040809@tartley.com> Message-ID: On 31 May 2014, at 11:13, Jonathan Hartley wrote: > That's what I thought too, but: > > $ python3 > Python 3.4.0 (default, Apr 19 2014, 12:20:10) > [GCC 4.8.1] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> class Some(object): > ... tokens = ['a', 'b', 'c'] > ... untokenized = [Some.tokens.index(a) for a in ['b']] > ... > Traceback (most recent call last): > File "", line 1, in > File "", line 3, in Some > File "", line 3, in > NameError: name 'Some' is not defined > The name Some is not bound until the class body has finished executing. You should just be able to access the name "tokens" from inside the class body though: python3 Python 3.3.4 (v3.3.4:7ff62415e426, Feb 9 2014, 00:29:34) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class Some: ... tokens = [1, 2, 3] ... thing = [token ** 2 for token in tokens] ... >>> Michael > > On 30/05/14 16:07, Sven Marnach wrote: >> On 30 May 2014 15:49, Harry Percival wrote: >> I had the problem outside of a class body, in a normal function... >> >> The particular problem mentioned in the StackOverflow quesiton you linked only ever occurs inside class bodies. They are the only enclosing scopes that are skipped in name lookups. You can still access class attributes of the class by using ClassName.attribute inside the list comprehension, like you would have to do to access class attributes from inside methods. >> >> Cheers, >> Sven >> >> >> >> _______________________________________________ >> python-uk mailing list >> >> python-uk at python.org >> https://mail.python.org/mailman/listinfo/python-uk > > -- > Jonathan Hartley > tartley at tartley.com http://tartley.com > > Made of meat. +44 7737 062 225 twitter/skype: tartley > > > _______________________________________________ > python-uk mailing list > python-uk at python.org > https://mail.python.org/mailman/listinfo/python-uk -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html From funthyme at gmail.com Sun Jun 1 02:12:01 2014 From: funthyme at gmail.com (John Pinner) Date: Sun, 1 Jun 2014 01:12:01 +0100 Subject: [python-uk] TDD stuff in London, next two weeks (and list comprehension scoping) In-Reply-To: References: <5389AB4A.8040809@tartley.com> Message-ID: Hello All, On 31 May 2014 23:02, Michael Foord wrote: > > On 31 May 2014, at 11:13, Jonathan Hartley wrote: > >> That's what I thought too, but: >> >> $ python3 >> Python 3.4.0 (default, Apr 19 2014, 12:20:10) >> [GCC 4.8.1] on linux >> Type "help", "copyright", "credits" or "license" for more information. >> >>> class Some(object): >> ... tokens = ['a', 'b', 'c'] >> ... untokenized = [Some.tokens.index(a) for a in ['b']] >> ... >> Traceback (most recent call last): >> File "", line 1, in >> File "", line 3, in Some >> File "", line 3, in >> NameError: name 'Some' is not defined >> > > The name Some is not bound until the class body has finished executing. or maybe (correct me if I'm wrong) until the interpreter has finished compiling the class (which does not happen until the end of the class definition has been reached). > You should just be able to access the name "tokens" from inside the class body though: > All the best, John -- From fuzzyman at voidspace.org.uk Sun Jun 1 16:54:52 2014 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 1 Jun 2014 15:54:52 +0100 Subject: [python-uk] TDD stuff in London, next two weeks (and list comprehension scoping) In-Reply-To: References: <5389AB4A.8040809@tartley.com> Message-ID: <097DCACF-D9F2-4890-8445-24DB4F2A036B@voidspace.org.uk> Sent from my iPhone > On 1 Jun 2014, at 01:12, John Pinner wrote: > > Hello All, > >> On 31 May 2014 23:02, Michael Foord wrote: >> >>> On 31 May 2014, at 11:13, Jonathan Hartley wrote: >>> >>> That's what I thought too, but: >>> >>> $ python3 >>> Python 3.4.0 (default, Apr 19 2014, 12:20:10) >>> [GCC 4.8.1] on linux >>> Type "help", "copyright", "credits" or "license" for more information. >>>>>> class Some(object): >>> ... tokens = ['a', 'b', 'c'] >>> ... untokenized = [Some.tokens.index(a) for a in ['b']] >>> ... >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "", line 3, in Some >>> File "", line 3, in >>> NameError: name 'Some' is not defined >> >> The name Some is not bound until the class body has finished executing. > > or maybe (correct me if I'm wrong) until the interpreter has finished > compiling the class (which does not happen until the end of the class > definition has been reached). No, it's at execution time. Compilation does not execute code and so does not bind names. Class bodies are executed to generate the class. Michael > >> You should just be able to access the name "tokens" from inside the class body though: > > > All the best, > > John > -- > _______________________________________________ > python-uk mailing list > python-uk at python.org > https://mail.python.org/mailman/listinfo/python-uk From ntoll at ntoll.org Fri Jun 6 09:54:11 2014 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Fri, 06 Jun 2014 08:54:11 +0100 Subject: [python-uk] Next London Python Code Dojo - 12th June at BAML in Canary Wharf Message-ID: <539173A3.7050401@ntoll.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Folks, What: The London Python Code Dojo Where: The offices of Bank of America in Canary Wharf When: Thursday 12th June at 6:30pm until 10pm (ish) How: Turn up, enjoy BAML's amazing hospitality, watch some lightning talks, code on an interesting problem, SHOW AND TELL!!! then a trip to the pub. (Remember to bring some official identification for the security desk.) Who: You, YES YOU!!! It's fun! Sign up & details here: https://ldnpydojo.eventwax.com/london-python-code-dojo-season-5-episode-11 Be quick, there are a limited number of tickets and they tend to get snaffled up quickly. Any volunteers for a lightning talk..? Ping me an email. Thanks to BAML for their continued support of the UK's Python community. See you there, Nicholas (and the rest of the cat herders). -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTkXOjAAoJEP0qBPaYQbb6/6EH/0yQ2brQLyDMEsuUJ0CzygAm tKvakG+VBI87/bi4MrUVubtNcu6iiDfOizkNyk2PZR9L1R/t+O9TXLtgpMTrrz+2 2+L1hTVfIyu5NGh298c1Ve1cuJoffyI9li5zTBqp28rpR6YAShFHFUsZJYU5e0sX 52/SU9D+cKltKA2Uuu2WjrpZvqwxiOcTKVuPXa1NMhUP7pI9gRILzoFegyMKjVTh BccCSK3ymLlYMRe96GDZ3yS0hDTRK59sKcVldTRkwiaHNzURVtu6vz9c/j90KGK4 9d4uxDd50A3y9iPSMxX2PcobS6OcRBwAmDaIDgNFk4byW04YEGjdZZrlfrzzT7A= =CVb7 -----END PGP SIGNATURE----- From ntoll at ntoll.org Fri Jun 13 13:09:30 2014 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Fri, 13 Jun 2014 12:09:30 +0100 Subject: [python-uk] Announcing the PyconUK Education Track Message-ID: <539ADBEA.8090302@ntoll.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Folks, Thanks to Steve Hawkes we have a wonderfully awesome landing page for the education track at PyconUK: http://pyconuk.org/education/ The PyconUK education track is all about the wonderful things that happen when diverse groups of people come together to learn about and work with fun technology. Know any teachers? Are you a teacher? Unsure what to do come September for the new national curriculum for IT? Come to PyconUK's teacher training day - an extraordinarily good value opportunity for CPD. Do you have kids who may be interested in playing with robots, Minecraft and other cool technology? Think they may enjoy coding with other kids under the guidance of experienced teachers and expert professional developers? Check out the kids' coding day at PyconUK. Last year was a blast. Tickets are limited! Check out the website (and see what teachers and kids got up to last year). Not for you? Tell your friends! Tweets and other forms of spreading the word etc... most welcome! :-) N. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTmtvqAAoJEP0qBPaYQbb61WUH/1QG2t8DOeDlDeIamkf9QbYL 9suRGFYqmloMCe6zZQFWQ1hLnSgL3Wt7s5JrVHcM3zRKy9co7DqNyJcvwkrtvIVI bWtre0Ec3fxmMe8GXLLkhBb2L9pwOkWxGyEojwhqKICJtZgXWwPG3MQGMXhI51Li TjzjKyKqum4AvGGttZcrwlF+bTYJaeY99nbfmSmdarkIN3ycwL6lR6c8YnfftDAs ECwbUpK4tsh4yUFX0oZDx+3aTpLvlORCtYcaei93yzBuIwjcMoluZJwmOu6RwmQK ALW/3lIAwvwUKPMxKcP1IB0sJBUo0XJ5tcqnRLCraE0eC+lVAXJV18gsMFqGZFE= =r772 -----END PGP SIGNATURE----- From funthyme at gmail.com Fri Jun 13 13:58:07 2014 From: funthyme at gmail.com (John Pinner) Date: Fri, 13 Jun 2014 12:58:07 +0100 Subject: [python-uk] Announcing the PyconUK Education Track In-Reply-To: <539ADBEA.8090302@ntoll.org> References: <539ADBEA.8090302@ntoll.org> Message-ID: Hi, and I'm pleased to say we have our first Regular Teacher booking. I wonder if he has All Bran for breakfast ? John -- On 13 June 2014 12:09, Nicholas H.Tollervey wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Folks, > > Thanks to Steve Hawkes we have a wonderfully awesome landing page for > the education track at PyconUK: > > http://pyconuk.org/education/ > > The PyconUK education track is all about the wonderful things that > happen when diverse groups of people come together to learn about and > work with fun technology. > > Know any teachers? Are you a teacher? Unsure what to do come September > for the new national curriculum for IT? Come to PyconUK's teacher > training day - an extraordinarily good value opportunity for CPD. > > Do you have kids who may be interested in playing with robots, > Minecraft and other cool technology? Think they may enjoy coding with > other kids under the guidance of experienced teachers and expert > professional developers? Check out the kids' coding day at PyconUK. > Last year was a blast. > > Tickets are limited! Check out the website (and see what teachers and > kids got up to last year). > > Not for you? Tell your friends! > > Tweets and other forms of spreading the word etc... most welcome! > > :-) > > N. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.12 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQEcBAEBAgAGBQJTmtvqAAoJEP0qBPaYQbb61WUH/1QG2t8DOeDlDeIamkf9QbYL > 9suRGFYqmloMCe6zZQFWQ1hLnSgL3Wt7s5JrVHcM3zRKy9co7DqNyJcvwkrtvIVI > bWtre0Ec3fxmMe8GXLLkhBb2L9pwOkWxGyEojwhqKICJtZgXWwPG3MQGMXhI51Li > TjzjKyKqum4AvGGttZcrwlF+bTYJaeY99nbfmSmdarkIN3ycwL6lR6c8YnfftDAs > ECwbUpK4tsh4yUFX0oZDx+3aTpLvlORCtYcaei93yzBuIwjcMoluZJwmOu6RwmQK > ALW/3lIAwvwUKPMxKcP1IB0sJBUo0XJ5tcqnRLCraE0eC+lVAXJV18gsMFqGZFE= > =r772 > -----END PGP SIGNATURE----- > _______________________________________________ > python-uk mailing list > python-uk at python.org > https://mail.python.org/mailman/listinfo/python-uk From ntoll at ntoll.org Fri Jun 13 14:05:53 2014 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Fri, 13 Jun 2014 13:05:53 +0100 Subject: [python-uk] Announcing the PyconUK Education Track In-Reply-To: References: <539ADBEA.8090302@ntoll.org> Message-ID: <539AE921.9080200@ntoll.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Whoop de doo... N. On 13/06/14 12:58, John Pinner wrote: > Hi, > > and I'm pleased to say we have our first Regular Teacher booking. > > I wonder if he has All Bran for breakfast ? > > John -- > > On 13 June 2014 12:09, Nicholas H.Tollervey > wrote: Hi Folks, > > Thanks to Steve Hawkes we have a wonderfully awesome landing page > for the education track at PyconUK: > > http://pyconuk.org/education/ > > The PyconUK education track is all about the wonderful things that > happen when diverse groups of people come together to learn about > and work with fun technology. > > Know any teachers? Are you a teacher? Unsure what to do come > September for the new national curriculum for IT? Come to PyconUK's > teacher training day - an extraordinarily good value opportunity > for CPD. > > Do you have kids who may be interested in playing with robots, > Minecraft and other cool technology? Think they may enjoy coding > with other kids under the guidance of experienced teachers and > expert professional developers? Check out the kids' coding day at > PyconUK. Last year was a blast. > > Tickets are limited! Check out the website (and see what teachers > and kids got up to last year). > > Not for you? Tell your friends! > > Tweets and other forms of spreading the word etc... most welcome! > > :-) > > N. >> _______________________________________________ python-uk mailing >> list python-uk at python.org >> https://mail.python.org/mailman/listinfo/python-uk > _______________________________________________ python-uk mailing > list python-uk at python.org > https://mail.python.org/mailman/listinfo/python-uk > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTmukeAAoJEP0qBPaYQbb6S44H/0BRYu/eG4M8kWnvz12yUwFp XTj1XqNxKuN6D47sLXQdRT61QU43+koHklWQ1wgP1/x4rLDkbMC/4BpW9EPEhKai dKJPNvGi3vyilk/ja/70KvDu0FgliCAHgFSAE1CCwW2y+Jz1c3MTBMEvBALEYI6A LXmxwS8SvitdbVSQPIQLr2LpGlgW90VIa6TyMKn8CaqIpCwa4HPEj7HHj4YpwRc8 5CMccJDMOh61UvOGvKoO9XfrKcK0tLVPM9l/fQO8B/kaAvzZouqqYi7G0OMXOkim LXite9RIjTDdAh9LsZDSlfByx6PuTYdTkFtpxCF1h9VVp3tVk8TN0E/UchUvHsU= =hIdA -----END PGP SIGNATURE----- From ntoll at ntoll.org Tue Jun 24 10:29:30 2014 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Tue, 24 Jun 2014 09:29:30 +0100 Subject: [python-uk] Fwd: [PyConUK-adm] Pycon WM: calling notice for meeting 28 June In-Reply-To: <8510E1E6-DEF0-4E42-9C15-D4BE71F9D546@gmail.com> References: <8510E1E6-DEF0-4E42-9C15-D4BE71F9D546@gmail.com> Message-ID: <53A936EA.8070506@ntoll.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 FYI - -------- Original Message -------- Subject: [PyConUK-adm] Pycon WM: calling notice for meeting 28 June Date: Tue, 24 Jun 2014 08:40:16 +0100 From: Mary Mooney To: pyconuk-adm at python.org, Robert Pinner , Sheila McKinstry Hello all The next meeting of Pycon WM will be on Saturday 28 June at the Technocentre Coventry. John P hopes to be hosting but if it is not John, Robert will be our host. Not to exhaust our welcome the meeting will start at 10 am and finish at 2pm. I am more than happy to pick up the jacket potato order en route so please make the order early on. If anyone else needs to see this message can you please forward it. Best wishes Mary Sent from my iPhone _______________________________________________ PyConUK-adm mailing list PyConUK-adm at python.org https://mail.python.org/mailman/listinfo/pyconuk-adm -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTqTbqAAoJEP0qBPaYQbb6YZ8H/iQ/dqe2UDkV9F+GTZAAIeP0 38Ya7bg1ShYnfbknoZABMDHY4wRieIZ2tner6JEm+IT5mbt8NhOz4Db7BkpzKxqf moNUm1w49ZY0O2qu71WuBbCUEEPB8HoICbKhCi6WhajMB+KamVihwbAX0tulnnwh RpSaL+gpTRlemiK3LhfiTRNtIDzGnyP1fGWE9IfP7kejI6E1aSX7O/heNXYZ8UdU UiRrmjgIEXWpN+GuiaReEV+ZvWd7P03jTVZbJnhqEGo3b3l2rGD8/hvkiLNnicTD ERApe9wo06+HbRNmBKe4lB7/aEuKghrutEiw/t9cNc/tAXWMs60DdKFOhalC0W0= =uYSQ -----END PGP SIGNATURE----- From alistair.broomhead at gmail.com Thu Jun 26 11:46:23 2014 From: alistair.broomhead at gmail.com (Alistair Broomhead) Date: Thu, 26 Jun 2014 10:46:23 +0100 Subject: [python-uk] Next London Python Code Dojo - 3rd June at Hogarth in Soho Message-ID: What: The London Python Code Dojo Where: The offices of Hogarth in Soho When: Thursday 3rd of July at 6:30pm until 10pm (ish) How: Turn up, enjoy Hogarth's amazing hospitality, watch some lightning talks, code on an interesting problem, SHOW AND TELL!!! then a trip to the pub. Who: You, YES YOU!!! It's fun! Sign up & details here: https://ldnpydojo.eventwax.com/london-python-code-dojo-season-5-episode-12 Be quick, there are a limited number of tickets and they tend to get snaffled up quickly (although the phantom tickets bug has been resolved). Any volunteers for a lightning talk..? Ping me an email. Thanks to Hogarth for their continued support of the UK's Python community. See you there, Al (and the rest of the cat herders). -------------- next part -------------- An HTML attachment was scrubbed... URL: From breamoreboy at yahoo.co.uk Thu Jun 26 11:57:13 2014 From: breamoreboy at yahoo.co.uk (Mark Lawrence) Date: Thu, 26 Jun 2014 10:57:13 +0100 Subject: [python-uk] Next London Python Code Dojo - 3rd June at Hogarth in Soho In-Reply-To: References: Message-ID: On 26/06/2014 10:46, Alistair Broomhead wrote: Any particular year? :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com From mail at timgolden.me.uk Thu Jun 26 12:42:02 2014 From: mail at timgolden.me.uk (Tim Golden) Date: Thu, 26 Jun 2014 11:42:02 +0100 Subject: [python-uk] Next London Python Code Dojo - 3rd June at Hogarth in Soho In-Reply-To: References: Message-ID: <53ABF8FA.4060801@timgolden.me.uk> On 26/06/2014 10:57, Mark Lawrence wrote: > On 26/06/2014 10:46, Alistair Broomhead wrote: > > Any particular year? :) > No -- come any year you like. TJG From gadgetsteve at hotmail.com Thu Jun 26 13:04:23 2014 From: gadgetsteve at hotmail.com (Steve Barnes) Date: Thu, 26 Jun 2014 12:04:23 +0100 Subject: [python-uk] Next London Python Code Dojo - 3rd June at Hogarth in Soho In-Reply-To: <53ABF8FA.4060801@timgolden.me.uk> References: <53ABF8FA.4060801@timgolden.me.uk> Message-ID: On 26/06/14 11:42, Tim Golden wrote: > On 26/06/2014 10:57, Mark Lawrence wrote: >> On 26/06/2014 10:46, Alistair Broomhead wrote: >> >> Any particular year? :) >> > No -- come any year you like. > > TJG > _______________________________________________ > python-uk mailing list > python-uk at python.org > https://mail.python.org/mailman/listinfo/python-uk > > Out of those years when the 3rd July is a Thursday! From tibs at tibsnjoan.co.uk Thu Jun 26 20:35:29 2014 From: tibs at tibsnjoan.co.uk (Tony Ibbs) Date: Thu, 26 Jun 2014 19:35:29 +0100 Subject: [python-uk] Next CamPUG meeting, Tue 1st July 2014 Message-ID: <9FBE0F5A-9958-4CE0-962F-E14ED125985A@tibsnjoan.co.uk> From the Cambridge and East Anglian Python Users Group google group: The next meeting will be Tuesday 1st July, 7.30pm at RealVNC (http://goo.gl/maps/ktqpS). We normally stop about 9.30pm, and go on to the pub. This will be a talks meeting. Feel free to bring a talk (or lightning talk, or thing to ask advice about), but you get extra brownie points if you tell the list about it first. Meetings after that will be: ? Tuesday 5th August, another doing stuff/miscellaneous meeting. I might not make this one, as it's getting close to the World Science Fiction Convention in London (www.loncon3.org, which is 14th-18th August). There's also EuroSciPy 27th-30th August, in Cambridge. ? Tuesday 2nd September - come and practice your talks and lightning talks for PyConUK (Fri 19th .. Sun 21 September, not including the tutorials on the Monday); I should have at least a lightning talk. ? Tuesday 7th October - a miscellaneous meeting, possibly talking about things learnt and fun had at PyConUK Tibs