From mail at timgolden.me.uk Thu May 1 15:53:32 2014 From: mail at timgolden.me.uk (Tim Golden) Date: Thu, 01 May 2014 14:53:32 +0100 Subject: [python-uk] London Python Dojo this evening Message-ID: <536251DC.8070005@timgolden.me.uk> We still have a couple of spare places for this evening's Dojo if you fancied coming along. 6.30pm for pizzas & beer courtesy of our long-standing hosts, Fry IT. 7.30pm for a few lightning talks and then an hour and a half of frantic coding. Sign up here: https://ldnpydojo.eventwax.com/london-python-code-dojo-season-5-episode-7-2-2 If anyone has a late-breaking idea for a lightning talk, please let me know. TJG From mail at timgolden.me.uk Fri May 2 22:00:14 2014 From: mail at timgolden.me.uk (Tim Golden) Date: Fri, 02 May 2014 21:00:14 +0100 Subject: [python-uk] Yesterday's Dojo -- team 3? Message-ID: <5363F94E.5050805@timgolden.me.uk> Do we have any code from team 3 at yesterday's London Python Dojo? All the other teams have their code up on the github: https://github.com/ldnpydojo/tamagotchi TJG From j.gomez-dans at ucl.ac.uk Thu May 8 12:58:21 2014 From: j.gomez-dans at ucl.ac.uk (Jose Gomez-Dans) Date: Thu, 8 May 2014 11:58:21 +0100 Subject: [python-uk] Job opportunity @ Planet Labs Message-ID: Hi, Hope this is not off-topic! Reply to Matt Waldram directly (email below) if interested. Regards Jose ---------------------------------------------------- Planet Labs are looking for a DevOps engineer to join a small team in an exciting venture. The role is very similar to that advertised here here (copied below), but will be based with a small team in the UK. Interested candidates can contact myself with a CV or can apply directly through the recruiterbox link above. Matt Waldram matthew.waldram at planet.com The Company Planet Labs are a space and analytics company; we design build and operate satellites, and analyze and provide services with the data we retrieve from them. We're always looking for great people to join our team. At Planet Labs, we seek to advance the state-of-the-art in space and computer science by applying new innovations and inventing new technology where necessary. We have a diverse research and technical staff. It is a small team, and a collaborative and creative atmosphere. We have a big mission and we seek highly performing and accountable people who care deeply about making a positive impact on the world. The Role At Planet Labs, we own and operate the largest constellation of Earth-imaging satellites in history. In the DevOps position, you will play a key part both in the development of Mission Control and in the actual operation of satellites. You'll train by flying what we've already launched and then you'll write code to make the process more automated and robust. Sound fun? Let's go! The must-haves: Lots of experience with heavy scripting and/or application development in Python and Javascript Experience with MySQL, PostgreSQL, or Oracle. Demonstrated ability to pick up new software, frameworks and API?s Demonstrated ability to be a self-starter Experience working on an Agile/TDD project The nice-to-haves: Python guru Web development guru (Django, JavaScript, JQuery, CoffeeScript, SQL) Advanced degree, multiple degrees, or independent contracting work. Experience acting as a technical lead, mentoring other engineers, teaching, etc. Experience or education in aerospace. A public portfolio, such as contributions to open-source software or websites you've designed Plus experience with any of the following: Open-source monitoring solutions (Nagios, Ganglia, Sensu, Graphite, Zenoss). Open-source logging solutions (Logster, Logstash, ...). Non-relational databases and key-value stores (MongoDB, CouchDB, Cassandra, Riak, Redis, Memcached). Source control (git, SVN). Build automation systems (Jenkins) Configuration management tools (Chef, Ansible, Puppet, Salt Stack) Development on a mobile platform (Android) Responsibilities Responsibilities are fluid -- we have several needs to fill and there's no reason to box someone in. Here's a list of all the things we'd like to get done. The more of these you would enjoy doing, the better: Manage the continuous integration process across multiple code repositories and multiple satellite designs. Manage the release and rollback process of ground and satellite software. Oversee the creation of a devops dashboard and alert system. Work with the developers to ensure that what they create is developed with operations in mind (logging, monitoring, telemetry output etc.). Work with the developers to ensure that what they create is scalable. Manage developer VMs and the onboarding of new engineers. Create the tools necessary for coordinating a distributed Ops team around the world. Fly satellites! -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at reynoldsfamily.org.uk Thu May 8 14:47:05 2014 From: david at reynoldsfamily.org.uk (David Reynolds) Date: Thu, 8 May 2014 13:47:05 +0100 Subject: [python-uk] Job opportunity @ Planet Labs In-Reply-To: References: Message-ID: <629A746E-6780-497D-8713-36285678E37D@reynoldsfamily.org.uk> Aside from the mention of "Create the tools necessary for coordinating a distributed Ops team around the world." the ad doesn't actually mention whether the role is open to applicants outside of SF. On 8 May 2014, at 11:58, Jose Gomez-Dans wrote: > Hi, > > Hope this is not off-topic! Reply to Matt Waldram directly (email below) if interested. > > Regards > Jose > ---------------------------------------------------- > > Planet Labs are looking for a DevOps engineer to join a small team in an exciting venture. The role is very similar to that advertised here here (copied below), but will be based with a small team in the UK. Interested candidates can contact myself with a CV or can apply directly through the recruiterbox link above. > > Matt Waldram > matthew.waldram at planet.com > > > The Company > Planet Labs are a space and analytics company; we design build and operate satellites, and analyze and provide services with the data we retrieve from them. We're always looking for great people to join our team. > > At Planet Labs, we seek to advance the state-of-the-art in space and computer science by applying new innovations and inventing new technology where necessary. We have a diverse research and technical staff. It is a small team, and a collaborative and creative atmosphere. > > We have a big mission and we seek highly performing and accountable people who care deeply about making a positive impact on the world. > > The Role > At Planet Labs, we own and operate the largest constellation of Earth-imaging satellites in history. In the DevOps position, you will play a key part both in the development of Mission Control and in the actual operation of satellites. You'll train by flying what we've already launched and then you'll write code to make the process more automated and robust. Sound fun? Let's go! > > The must-haves: > Lots of experience with heavy scripting and/or application development in Python and Javascript > Experience with MySQL, PostgreSQL, or Oracle. > Demonstrated ability to pick up new software, frameworks and API?s > Demonstrated ability to be a self-starter > Experience working on an Agile/TDD project > > The nice-to-haves: > Python guru > Web development guru (Django, JavaScript, JQuery, CoffeeScript, SQL) > Advanced degree, multiple degrees, or independent contracting work. > Experience acting as a technical lead, mentoring other engineers, teaching, etc. > Experience or education in aerospace. > A public portfolio, such as contributions to open-source software or websites you've designed > > Plus experience with any of the following: > Open-source monitoring solutions (Nagios, Ganglia, Sensu, Graphite, Zenoss). > Open-source logging solutions (Logster, Logstash, ...). > Non-relational databases and key-value stores (MongoDB, CouchDB, Cassandra, Riak, Redis, Memcached). > Source control (git, SVN). > Build automation systems (Jenkins) > Configuration management tools (Chef, Ansible, Puppet, Salt Stack) > Development on a mobile platform (Android) > > Responsibilities > Responsibilities are fluid -- we have several needs to fill and there's no reason to box someone in. Here's a list of all the things we'd like to get done. The more of these you would enjoy doing, the better: > > Manage the continuous integration process across multiple code repositories and multiple satellite designs. > Manage the release and rollback process of ground and satellite software. > Oversee the creation of a devops dashboard and alert system. > Work with the developers to ensure that what they create is developed with operations in mind (logging, monitoring, telemetry output etc.). > Work with the developers to ensure that what they create is scalable. > Manage developer VMs and the onboarding of new engineers. > Create the tools necessary for coordinating a distributed Ops team around the world. > Fly satellites! > > > _______________________________________________ > python-uk mailing list > python-uk at python.org > https://mail.python.org/mailman/listinfo/python-uk From harry.percival at gmail.com Fri May 9 22:02:37 2014 From: harry.percival at gmail.com (Harry Percival) Date: Fri, 9 May 2014 21:02:37 +0100 Subject: [python-uk] Fwd: [The-London-Python-Group-TLPG] Could you coach python students at OpenTechSchool this monday 12th May? In-Reply-To: <625695428.1399664377713.JavaMail.nobody@james0.pvt.meetup.com> References: <625695428.1399664377713.JavaMail.nobody@james0.pvt.meetup.com> Message-ID: London only I'm afraid, but if anyone is free 6:30PM til 8PM on Monday next week, these guys would love to hear from you! ---------- Forwarded message ---------- From: Antonio Cavallo Date: 9 May 2014 20:39 Subject: [The-London-Python-Group-TLPG] Could you coach python students at OpenTechSchool this monday 12th May? To: The-London-Python-Group-TLPG-announce at meetup.com Dear pythonistas, we received from Gen Ashley on behalf of OpenTechSchool this urgent request: Dates: 12th May 2014 and 19th May Place: The Skills Matter eXchange, 116-120 Goswell Road, EC1V 7DP, London Time: starts at 18.30 OpenTechSchool would like to invite you to coach for one of their free classes offered to new learners of Python. We are holding our third batch of classes (2nd batch for Python, which is proving to be popular to learners) this MONDAY, MAY 12 and next MONDAY, MAY 19, but we are currently short on Python coaches. In case you wonder, here is a link to a short coaching guide - which describes how the classes are run: http://opentechschool.github.io/slides/presentations/coaching/ [2]. There are around 60 learners signed up (with 30+ more on the waiting list) and we will need around 4-5 more coaches. Developers don?t need to commit to both dates, but it will be nice. Here is a link to the "Beginners Python learning materials": http://opentechschool.github.io/python-beginners/en/index.html. [3] The classes will be held at SKILLS MATTER, Goswell Road, London from 6:30pm to 8pm. We are hoping to hear back from developers who has some time to spare (especially this coming Monday). We understand this is short notice. If you have the time to spare this MONDAY, MAY 12 and/or the next MONDAY, MAY 19 - please email team.london at opentechschool.org. WE?D LOVE TO HEAR FROM YOU! Best, Gen Ashley Co-Organiser, OpenTechSchool London What is OpenTechSchool? ----------------------- OpenTechSchool London (http://www.meetup.com/opentechschool-london [1]) is a community initiative offering free programming workshops and meetups to technology enthusiasts of all genders, backgrounds, and experience levels. It supports volunteer coaches in setting up events by taking care of the organizational details. OTS? main goal is to create a friendly learning environment where no one feels shy about asking any question. Everyone is invited to participate, whether as a coach or a learner. The range of free courses offered can range from HTML/CCS/JavaScript to Python, Ruby, GIT, Mobile development and others. As these are ?coaching? classes, rather than a ?teaching? class, it?s a more relaxed environment for both learners and coaches, as there is no teacher in front, but coaches are around to help learners, if they hit difficulty, as they go through the learning materials (already prepared). Please see http://www.meetup.com/opentechschool-london [1] to see photos from previous coaching classes. Links: ------ [1] http://www.meetup.com/opentechschool-london [2] http://opentechschool.github.io/slides/presentations/coaching/ [3] http://opentechschool.github.io/python-beginners/en/index.html. -- This message was sent by Antonio Cavallo (a.cavallo at cavallinux.eu) from The London Python Group - TLPG . To learn more about Antonio Cavallo, visit his/her member profile To report this message or block the sender, please click here To unsubscribe from special announcements from your Organizer(s), click here Meetup, POB 4668 #37895 NY NY USA 10163 <#145e27f8264ad2e2_> | support at meetup.com -- ------------------------------ Harry J.W. Percival ------------------------------ Twitter: @hjwp Mobile: +44 (0) 78877 02511 Skype: harry.percival -------------- next part -------------- An HTML attachment was scrubbed... URL: From rgammans at gammascience.co.uk Wed May 7 19:23:08 2014 From: rgammans at gammascience.co.uk (Roger Gammans) Date: Wed, 07 May 2014 18:23:08 +0100 Subject: [python-uk] West Kent Python developer position available Message-ID: <1399483388.22023.16.camel@knuth.computer-surgery.co.uk> We are a small family run consultancy looking for a Python developer to work with us at our office in Pembury, Kent. You will be expected to be comfortable at the Unix command line and be familiar with common tools such as git. Other programming language such as C/C++ , Java and Javascript will be a bonus. To apply please send an upto date CV to careers at gammascience.co.uk . -- Roger Gammans From andy.worsley at graze.com Mon May 12 10:45:17 2014 From: andy.worsley at graze.com (Andy Worsley) Date: Mon, 12 May 2014 09:45:17 +0100 Subject: [python-uk] graze.com is hiring for a Python DevOps role Message-ID: All, I work in the Tech team at http://www.graze.com/. We're looking to hire someone to develop our DevOps capability, improve our software delivery process and contribute innovative ideas to the team. Please see below for the full role description. If you are interested: * Please do get in touch with me directly for more information. * Do take a look at our website http://www.graze.com/uk/jobs. * Send me your CV or LinkedIn/GitHub profile, and I can pass on your details to our recruitment manager. Cheers, -- andy worsley operations technology manager graze. nature delivered. *** Summary *** Python Developer (DevOps) Location: Richmond, London, United Kingdom Type: Full Time *** About us *** Graze is a fast-growth, technology company started by 7 friends who all share a passion for food. We deliver tasty, natural snacks through the post in the UK and the US. We currently employ approx. 300 people split between our offices in the UK and the US and the three factories in Feltham, Hayes (UK) and New Jersey (US). We are growing at a phenomenal rate, particularly since our recent successful launch in the USA. Based on a home-grown and highly scalable technology platform, everything from our website through to our customer service tools and dispatch systems is built in PHP/MySQL and served through Amazon Web Services or locally in our premises in Richmond. We believe in engineering for scale and investing in the both latest technologies and in your personal development. *** About the role *** We are looking to recruit a Python developer to design, write and deploy scalable infrastructure software. One minute you could be architecting, optimising, managing and automating our extensive cloud presence, the next our network and server infrastructure running our manufacturing and fulfilment operations. Or rolling out new, cutting edge technologies to assist our software development teams. The challenges here are huge and varied. This position requires a proactive individual who is passionate about developing new technology while finding ways to balance company objectives with real world operations and who shows exceptional development potential. *** Essential experience *** * Designing, writing and deploying scalable software in Python * Knowledge of DevOps principles and practices * Excellent Linux administration skills, from setup to deployment, performance tuning and monitoring *** Desirable *** * Experience with Amazon Web Services or other auto-scaling infrastructure * Configuration management (Puppet, Chef) * Boto * Percona MySQL and NoSQL databases (e.g. Couchbase, Redis) * Advanced monitoring and logging (Nagios, Ganglia, Cacti, Datadog, statsd) Please note that prior knowledge in the above is desirable but by no means a necessity and should not discourage you from applying. Graze has a culture focused on developing potential in individuals who enjoy learning new skills in a fast moving environment. *** How to apply *** If you are interested: * Please do get in touch with me directly for more information. * Do take a look at our website http://www.graze.com/uk/jobs. * Send me your CV or LinkedIn/GitHub profile, and I can pass on your details to our recruitment manager. From michael at voidspace.org.uk Mon May 19 10:50:59 2014 From: michael at voidspace.org.uk (Michael Foord) Date: Mon, 19 May 2014 09:50:59 +0100 Subject: [python-uk] Northants Geeks: 22nd May Message-ID: <5379C5F3.6070500@voidspace.org.uk> Hey all, It's that time of the month again: the Northants Geek meetup is this Thursday. 8pm in the Malt Shovel pub, Northampton. Beer and geeky conversation. Hopefully see some of you there! All the best, Michael Foord From tartley at tartley.com Mon May 19 15:39:42 2014 From: tartley at tartley.com (Jonathan Hartley) Date: Mon, 19 May 2014 14:39:42 +0100 Subject: [python-uk] Python devs wanted at "Made", Notting Hill Message-ID: <537A099E.5080906@tartley.com> Hey all, We're recruiting! Permanent, office in Notting Hill, on site only, small flexibility in hours in times of need, but mostly sorta 8 till 5 or 9:30-6:30 ish. My employer is "Made" (http://made.com), a 4 year old, 100 person company, which commissions, imports, and retails swanky furniture for decent prices. The business model eliminates middlemen and aims to sell most items while they are on a ship which is just about to reach England, thus reducing lead times, transportation and warehousing costs. My team is the 5-person Python "ERP" team. ERP stands for "Enterprise Resource Planning", and means the logistics of slogging parcels around between factories, warehouses, containers and customers. To do this, we use a popular framework called "Odoo" (was "OpenERP"), that feels a little like using Django in some ways. You won't be working on our website, which is handled by a separate 10 person PHP team who sits adjacently. They have impressed me with their professionalism and competence, but nevertheless we exchange good-natured broadsides from time to time to keep them in check. There are some fun technical challenges that we're just beginning to get stuck into, a smashingly sane CTO and senior management, and the environment benefits (IMHO) from a Nathan-Barley-like army of youthful "creatives", downstairs, who do various product design and photo shoot kinds of work. It's all leggy folks draped over sofas (showroom is onsite) and "flowers for the model" on expenses, which brightens up both office life and company pub trips. Hit me up if you're interested. Best regards, Jonathan Hartley -- Jonathan Hartley tartley at tartley.com http://tartley.com Made of meat. +44 7737 062 225 twitter/skype: tartley From ntoll at ntoll.org Mon May 19 16:50:19 2014 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Mon, 19 May 2014 15:50:19 +0100 Subject: [python-uk] Openworm - act now! Message-ID: <537A1A2B.4000809@ntoll.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I normally don't do this. But what the hell, it's about another serpent-like software project. ;-) As of the current time of writing the OpenWorm project is about one hour away from their Kickstarter deadline and just shy of their goal. If you've got a spare ?25 you should back these guys: https://www.kickstarter.com/projects/openworm/openworm-a-digital-organism-in-your-browser (Note: I'm not involved with this project in any way, although a buddy is one of the team. I'd love to see these guys funded quite simply because the project is fascinating.) Apologies for the noise on the line... Nicholas. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTehooAAoJEP0qBPaYQbb6w1wIAJHQDUTpwYdacIJr+qS3tKup uc2ssfgW0Ow0l6zAZaxzJtWQ/pqNIV1aX6kqcGZkAJuR/KTMkNctwphivdupiPXM pyWlSQcgmcMH4AJWA544BIlYze1Sot5j4luUZXgDYI1VlCTE8q1avnVncIbDN6do 3XaPl3ZxF7yVc/CK+f41DNgZoiS6DZP+NjyxBbPnw7Oj+699eXq53x7I+ac85btR 22VKVnuArRbIREeYLTEO/Pe8Jt4BL71XfpI2xzrZhulkMXq2gOnbRS75YfEzE5oV 4qFm/N1ah1JNFOU6sm6RocR+DXZcCNHKnYUYvQYQaTRZmpMGrzAMc1BUc3fJSQA= =XPaK -----END PGP SIGNATURE----- From ntoll at ntoll.org Mon May 19 17:04:56 2014 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Mon, 19 May 2014 16:04:56 +0100 Subject: [python-uk] Openworm - act now! In-Reply-To: <537A1A2B.4000809@ntoll.org> References: <537A1A2B.4000809@ntoll.org> Message-ID: <537A1D98.6040304@ntoll.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ...and they made it. ;-) On 19/05/14 15:50, Nicholas H.Tollervey wrote: > Hi, > > I normally don't do this. But what the hell, it's about another > serpent-like software project. ;-) > > As of the current time of writing the OpenWorm project is about > one hour away from their Kickstarter deadline and just shy of their > goal. If you've got a spare ?25 you should back these guys: > > https://www.kickstarter.com/projects/openworm/openworm-a-digital-organism-in-your-browser > > > > (Note: I'm not involved with this project in any way, although a > buddy is one of the team. I'd love to see these guys funded quite > simply because the project is fascinating.) > > Apologies for the noise on the line... > > Nicholas. _______________________________________________ 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/ iQEcBAEBAgAGBQJTeh2UAAoJEP0qBPaYQbb6AHsH/1H69K5XnfI+hXxLx/bCrtvE mUOKiEPbFB2X05ABrE8BmlXQ4RxclpeD5LIe22kppYa27NwmkOhhaDnyogQJd+GH Sb4bQlTAafBOGpeUGzSFJwBms2KkBOzHRJjklb+WrG070wk8Q9u3aYP6h/fy4vgw H8pRx9noKpC2DPypHw309nNGLiXBUefwRdC+VMfdI/IjNq4IVL0/uIKamj/QnzRk luzqeZkBlrAttKUee1Fw+CADukJK45k7thJusiDMx26PEpvEtkWLTKwx7xnw7ssp CXdXcRHJWTYR2NibR7fnyj7YNdKKDIupXO4tMhWs5Agwc9uulR84XLak0jkTMVg= =sVJb -----END PGP SIGNATURE----- From michael.davis at bodleian.ox.ac.uk Tue May 27 12:26:56 2014 From: michael.davis at bodleian.ox.ac.uk (Michael Davis) Date: Tue, 27 May 2014 10:26:56 +0000 Subject: [python-uk] Bodleian Library looking for pythonistas Message-ID: <3A5AFE02D254D0469285A8C30B24C3BF7C81F7@MBX05.ad.oak.ox.ac.uk> The Bodleian Library is looking for three new developers, working on a variety of python frameworks. Primarily Django and Pyramid, with some legacy applications on Pylons. There is also the opportunity to work on other technology, such as Fedora Commons. This is an ideal opportunity for a solid python developer interested in getting involved with a wider range of technology. http://www.bodleian.ox.ac.uk/about-us/jobs#vacancy-113339 http://www.bodleian.ox.ac.uk/about-us/jobs#vacancy-113341 Michael Davis Digital Portfolio Manager Bodleian Library -------------- next part -------------- An HTML attachment was scrubbed... URL: From harry.percival at gmail.com Fri May 30 16:01:01 2014 From: harry.percival at gmail.com (Harry Percival) Date: Fri, 30 May 2014 15:01:01 +0100 Subject: [python-uk] TDD stuff in London, next two weeks (and list comprehension scoping) Message-ID: Hi Uk-Pythoneers! *(with apologies to the wise ones amongst us who have chosen to live well away from the Big Smoke)* I'm involved in a couple of Python/TDD things in the next couple of weeks, both free to attend: Outside-In TDD and Test Isolation: https://skillsmatter.com/meetups/6410-outside-in-tdd-and-test-isolation-how-to-use-the-pain-of-horrible-mocks-to-drive-better-design (all about testing, isolation, mocking, and the pains thereof... it may to provide some insight into the #TDDisDead / DHH controversy, if you've been following that) Introduction to TDD workshop with Andrea Crotti: https://skillsmatter.com/meetups/6424-obey-the-testing-goat (a gentle introduction to TDD with Django, for anyone that can't make it to EuroPython this year) Hope they're of interest! HP PS Can I have a little moan about generator / list comprehension scoping in Python 3? I just ran into this: https://stackoverflow.com/questions/11669379/undefined-global-in-list-generator-expression-using-python3-works-with-python2 -- so now I can't use variables from the enclosing scope inside my comprehensions? that sucks! Doesn't it? -- ------------------------------ Harry J.W. Percival ------------------------------ Twitter: @hjwp Mobile: +44 (0) 78877 02511 Skype: harry.percival -------------- next part -------------- An HTML attachment was scrubbed... URL: From harry.percival at gmail.com Fri May 30 16:49:20 2014 From: harry.percival at gmail.com (Harry Percival) Date: Fri, 30 May 2014 15:49:20 +0100 Subject: [python-uk] TDD stuff in London, next two weeks (and list comprehension scoping) In-Reply-To: References: Message-ID: I had the problem outside of a class body, in a normal function... (of course I can't build a minimal repro now. working on it.) On 30 May 2014 15:37, Tim Diggins wrote: > Harry > *//excursus on the moan * > The problem with seems to be with scopes vs namespace differentiation > rather than comprehensions (though I haven't *actually* tried this in > python 3). So this problem only should occur in class bodies. And doing > heavy lifting stuff like comprehensions in a class body is a bit dangerous, > and you'd be better off doing it "properly" with a bit of metaprogramming > or wrapping it in function (which you could actually call in the body of > the module after class definition and then modify the class after creation) > > > > > On 30 May 2014 15:01, Harry Percival wrote: > >> Hi Uk-Pythoneers! >> >> *(with apologies to the wise ones amongst us who have chosen to live well >> away from the Big Smoke)* >> >> I'm involved in a couple of Python/TDD things in the next couple of >> weeks, both free to attend: >> >> >> Outside-In TDD and Test Isolation: >> https://skillsmatter.com/meetups/6410-outside-in-tdd-and-test-isolation-how-to-use-the-pain-of-horrible-mocks-to-drive-better-design >> (all about testing, isolation, mocking, and the pains thereof... it may >> to provide some insight into the #TDDisDead / DHH controversy, if you've >> been following that) >> >> Introduction to TDD workshop with Andrea Crotti: >> https://skillsmatter.com/meetups/6424-obey-the-testing-goat >> (a gentle introduction to TDD with Django, for anyone that can't make it >> to EuroPython this year) >> >> Hope they're of interest! >> >> HP >> >> PS Can I have a little moan about generator / list comprehension scoping >> in Python 3? I just ran into this: >> https://stackoverflow.com/questions/11669379/undefined-global-in-list-generator-expression-using-python3-works-with-python2 >> -- so now I can't use variables from the enclosing scope inside my >> comprehensions? that sucks! Doesn't it? >> >> >> >> >> -- >> ------------------------------ >> Harry J.W. Percival >> ------------------------------ >> Twitter: @hjwp >> Mobile: +44 (0) 78877 02511 >> Skype: harry.percival >> >> _______________________________________________ >> python-uk mailing list >> python-uk at python.org >> https://mail.python.org/mailman/listinfo/python-uk >> >> > -- ------------------------------ Harry J.W. Percival ------------------------------ Twitter: @hjwp Mobile: +44 (0) 78877 02511 Skype: harry.percival -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at red56.co.uk Fri May 30 16:37:49 2014 From: tim at red56.co.uk (Tim Diggins) Date: Fri, 30 May 2014 15:37:49 +0100 Subject: [python-uk] TDD stuff in London, next two weeks (and list comprehension scoping) In-Reply-To: References: Message-ID: Harry *//excursus on the moan * The problem with seems to be with scopes vs namespace differentiation rather than comprehensions (though I haven't *actually* tried this in python 3). So this problem only should occur in class bodies. And doing heavy lifting stuff like comprehensions in a class body is a bit dangerous, and you'd be better off doing it "properly" with a bit of metaprogramming or wrapping it in function (which you could actually call in the body of the module after class definition and then modify the class after creation) On 30 May 2014 15:01, Harry Percival wrote: > Hi Uk-Pythoneers! > > *(with apologies to the wise ones amongst us who have chosen to live well > away from the Big Smoke)* > > I'm involved in a couple of Python/TDD things in the next couple of weeks, > both free to attend: > > > Outside-In TDD and Test Isolation: > https://skillsmatter.com/meetups/6410-outside-in-tdd-and-test-isolation-how-to-use-the-pain-of-horrible-mocks-to-drive-better-design > (all about testing, isolation, mocking, and the pains thereof... it may to > provide some insight into the #TDDisDead / DHH controversy, if you've been > following that) > > Introduction to TDD workshop with Andrea Crotti: > https://skillsmatter.com/meetups/6424-obey-the-testing-goat > (a gentle introduction to TDD with Django, for anyone that can't make it > to EuroPython this year) > > Hope they're of interest! > > HP > > PS Can I have a little moan about generator / list comprehension scoping > in Python 3? I just ran into this: > https://stackoverflow.com/questions/11669379/undefined-global-in-list-generator-expression-using-python3-works-with-python2 > -- so now I can't use variables from the enclosing scope inside my > comprehensions? that sucks! Doesn't it? > > > > > -- > ------------------------------ > Harry J.W. Percival > ------------------------------ > Twitter: @hjwp > Mobile: +44 (0) 78877 02511 > Skype: harry.percival > > _______________________________________________ > python-uk mailing list > python-uk at python.org > https://mail.python.org/mailman/listinfo/python-uk > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From smarnach at google.com Fri May 30 17:07:36 2014 From: smarnach at google.com (Sven Marnach) Date: Fri, 30 May 2014 16:07:36 +0100 Subject: [python-uk] TDD stuff in London, next two weeks (and list comprehension scoping) In-Reply-To: References: Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From harry.percival at gmail.com Fri May 30 20:09:06 2014 From: harry.percival at gmail.com (Harry Percival) Date: Fri, 30 May 2014 19:09:06 +0100 Subject: [python-uk] TDD stuff in London, next two weeks (and list comprehension scoping) In-Reply-To: <1401463003.21422.14.camel@knuth.computer-surgery.co.uk> References: <1401463003.21422.14.camel@knuth.computer-surgery.co.uk> Message-ID: ah. I think i figured it out -- it's actually just a weird py.test thing. something to do with its assert-introspection-voodoo... On 30 May 2014 16:16, Roger Gammans wrote: > On Fri, 2014-05-30 at 16:07 +0100, 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. > > Hmm. It quite odd, it appears to only affect the evaluation part of the > list-comprehension too. Notice the way that a naked reference to a works > as the argument to range() , but not when used in the expr part of the > list comprehension. > > $ python3.3 > Python 3.3.3 (default, Dec 8 2013, 14:51:59) > [GCC 4.8.2] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> class X: > ... a = 3 > ... b = [ y for y in range(a) ] > ... > >>> X.b > [0, 1, 2] > >>> class X: > ... a = 3 > ... b = [ y*a for y in range(a) ] > ... > Traceback (most recent call last): > File "", line 1, in > File "", line 3, in X > File "", line 3, in > NameError: global name 'a' is not defined > >>> class X: > ... a = 3 > ... b = [ y*X.a for y in range(a) ] > ... > >>> X.b > [0, 3, 6] > > > -- > Roger Gammans > -- ------------------------------ Harry J.W. Percival ------------------------------ Twitter: @hjwp Mobile: +44 (0) 78877 02511 Skype: harry.percival -------------- next part -------------- An HTML attachment was scrubbed... URL: From tartley at tartley.com Sat May 31 12:13:30 2014 From: tartley at tartley.com (Jonathan Hartley) Date: Sat, 31 May 2014 11:13:30 +0100 Subject: [python-uk] TDD stuff in London, next two weeks (and list comprehension scoping) In-Reply-To: References: Message-ID: <5389AB4A.8040809@tartley.com> 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: