Re: [portland] looking back on recent Python haps and recent Luciano's visit

2015-08-27 Thread Luciano Ramalho
Thanks for the kind words Kirby and Stephen!

Looking up the PDX PUG was the best thing I did in this trip. I had I
great time presenting to you and drinking beer afterwards.

I am specially grateful to Paul M who kindly hosted me at his place
with his wonderful family. Also thanks to everyone else who offered me
places to stay when I asked. You rock!

And if you ever come to São Paulo, let me know.

I hope to see you all next year at PyCon!

Cheers,

Luciano

On Sat, Aug 22, 2015 at 5:41 PM, Stephen McCray mcbrac...@gmail.com wrote:
 I concur whole-heartedly.  I really enjoyed Luciano's talk at the PDX
 Python event night and immediately got Fluent Python afterwards.  I haven't
 gotten all the way through it but so far I think it's a great book for
 taking people from good Python programmers to excellent Python
 programmers.

 As an aside, I'd also like to remind people that the Portland Python Users
 Group works with O'Reilly and that you can get a 50% discount off of eBooks
 and 40% off of print books (including Fluent Python) by using the discount
 code PCBW on their site.

 -Bracket

 On Sat, Aug 22, 2015 at 9:41 AM, kirby urner kirby.ur...@gmail.com wrote:

 Followup:

 I really enjoyed both talks Luciano gave at OSCON.

 My college-age daughter is deeply into using Arduinos and such for serious
 science [1] and is studying Python both in her college and through O'Reilly
 where I work.  I wrote to her about Pin.go right away.

 As a perk of my job I also get Safari Books On-Line where Luciano's new
 O'Reilly book, Fluent Python, has recently appeared.  I'm finding it really
 useful and apropos given my day job as a Python mentor.  Lots of details
 I've wanted to study up on but as too lazy to do so, are now succinctly
 summarized for me, such as how hashing works and the relationship of
 __hash__ and id etc.

 I've always been impressed by the emerging Pythonista subculture in Brazil
 and Luciano reinforces my admiration.  Two OSCONs ago I hung out with Tatia
 from Brazil, who's dad is a professor of literature.  She was really
 excited by my i18n focus and hopes of getting more of our own curriculum in
 Portuguese in a way customized for Brazilian mentors.

 Kirby


 [1]  http://earlham.edu/news/article/?id=37371r=14619
 (that's my daughter holding the microphone)
 -- next part --
 An HTML attachment was scrubbed...
 URL: 
 http://mail.python.org/pipermail/portland/attachments/20150822/61250ff5/attachment.html
 
 ___
 Portland mailing list
 Portland@python.org
 https://mail.python.org/mailman/listinfo/portland

 -- next part --
 An HTML attachment was scrubbed...
 URL: 
 http://mail.python.org/pipermail/portland/attachments/20150822/31ede8cd/attachment.html
 ___
 Portland mailing list
 Portland@python.org
 https://mail.python.org/mailman/listinfo/portland



-- 
Luciano Ramalho
|  Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
|  Professor em: http://python.pro.br
|  Twitter: @ramalhoorg
___
Portland mailing list
Portland@python.org
https://mail.python.org/mailman/listinfo/portland


[portland] Attend (some of) OSCON free

2015-07-11 Thread Luciano Ramalho
I’m speaking at the O'Reilly Open Source Convention (OSCON) in just a
few weeks and I have free Expo Plus passes available. OSCON is the
best place to sharpen your skills and discover important new trends,
making you better at what you do and rekindling your love of all
things digital.

The Expo Plus pass is a great way to see what OSCON is all about. The
pass includes access to the expo hall, all evening events, sponsored
sessions and tutorials, Birds of a Feather sessions, and much more.

Use code SPEXPO to get your free OSCON pass now (a $49 value). See
everything included in this pass:
http://www.oscon.com/open-source-2015/public/content/expoplus

Best,

Luciano

PS. Blurb and pass courtesy of OSCON organizers.


-- 
Luciano Ramalho
|  Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
|  Professor em: http://python.pro.br
|  Twitter: @ramalhoorg
___
Portland mailing list
Portland@python.org
https://mail.python.org/mailman/listinfo/portland


Re: [portland] PEP 8 Line Length Compliance

2015-05-21 Thread Luciano Ramalho
Of course in the first syntax rule I mention I should have said:

Whenever you open a parenthesis, brace or bracket, every newline is
considered as plain space by the parser UNTIL YOU CLOSE THE
PARENTHESIS, BRACE OR BRACKET.

Which is rather obvious...

Best,

Luciano

On Thu, May 21, 2015 at 12:13 PM, Luciano Ramalho luci...@ramalho.org wrote:
 You can escape the newline and the end of a line by typing \ as the
 last character, but I think this is ugly and error prone and I avoid
 it whenever I can -- which is almost always.

 There are two syntax rules of Python that are not so well-known that
 help avoiding the \:

 - Whenever you open a parenthesis, brace or bracket, every newline is
 considered as plain space by the parser. Very often, adding
 parenthesis around an expression does not change it's meaning, so
 that's one way to make one logical line span multiple physical lines
 without resorting to \.

 - Two or more string literals with no intervening tokens except
 whitespace are parsed as a single string literal.

 Putting those two rules together, the result is that this snippet:

 text = ('a bb ccc  e '
'ff ggg ')

 Is exactly the same as this one, as far as the Python interpreter is 
 concerned:

 text = 'a bb ccc  e ff ggg hh'

 But note that I appended a trailing space to the first string literal,
 otherwise the parser would see this:

 text = 'a bb ccc  eff ggg hh'


 HTH.

 Best,

 Luciano



 On Thu, May 21, 2015 at 11:53 AM, Rich Shepard rshep...@appl-ecosys.com 
 wrote:
   I use emacs for writing code (among other editing tasks) and have the line
 length set to 78 characters. That's the recommended maximum line length in
 PEP 8. However, when I have a lot of text for an import command, or within a
 single-quoted string, python complains about unexpected endings if I break
 the string with a newline prior to column 78.

   Should I just ignore that PEP 8 suggestion or is there a line continuation
 character (such as \) that can be applied?

 Rich
 ___
 Portland mailing list
 Portland@python.org
 https://mail.python.org/mailman/listinfo/portland



 --
 Luciano Ramalho
 |  Author of Fluent Python (O'Reilly, 2015)
 | http://shop.oreilly.com/product/0636920032519.do
 |  Professor em: http://python.pro.br
 |  Twitter: @ramalhoorg



-- 
Luciano Ramalho
|  Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
|  Professor em: http://python.pro.br
|  Twitter: @ramalhoorg
___
Portland mailing list
Portland@python.org
https://mail.python.org/mailman/listinfo/portland


Re: [portland] PEP 8 Line Length Compliance

2015-05-21 Thread Luciano Ramalho
You can escape the newline and the end of a line by typing \ as the
last character, but I think this is ugly and error prone and I avoid
it whenever I can -- which is almost always.

There are two syntax rules of Python that are not so well-known that
help avoiding the \:

- Whenever you open a parenthesis, brace or bracket, every newline is
considered as plain space by the parser. Very often, adding
parenthesis around an expression does not change it's meaning, so
that's one way to make one logical line span multiple physical lines
without resorting to \.

- Two or more string literals with no intervening tokens except
whitespace are parsed as a single string literal.

Putting those two rules together, the result is that this snippet:

text = ('a bb ccc  e '
   'ff ggg ')

Is exactly the same as this one, as far as the Python interpreter is concerned:

text = 'a bb ccc  e ff ggg hh'

But note that I appended a trailing space to the first string literal,
otherwise the parser would see this:

text = 'a bb ccc  eff ggg hh'


HTH.

Best,

Luciano



On Thu, May 21, 2015 at 11:53 AM, Rich Shepard rshep...@appl-ecosys.com wrote:
   I use emacs for writing code (among other editing tasks) and have the line
 length set to 78 characters. That's the recommended maximum line length in
 PEP 8. However, when I have a lot of text for an import command, or within a
 single-quoted string, python complains about unexpected endings if I break
 the string with a newline prior to column 78.

   Should I just ignore that PEP 8 suggestion or is there a line continuation
 character (such as \) that can be applied?

 Rich
 ___
 Portland mailing list
 Portland@python.org
 https://mail.python.org/mailman/listinfo/portland



-- 
Luciano Ramalho
|  Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
|  Professor em: http://python.pro.br
|  Twitter: @ramalhoorg
___
Portland mailing list
Portland@python.org
https://mail.python.org/mailman/listinfo/portland


Re: [portland] PEP 8 Line Length Compliance

2015-05-21 Thread Luciano Ramalho
On Thu, May 21, 2015 at 12:24 PM, Rich Shepard rshep...@appl-ecosys.com wrote:
 On Thu, 21 May 2015, Luciano Ramalho wrote:
 - Two or more string literals with no intervening tokens except
 whitespace are parsed as a single string literal.


   Unless the string is delineated with single quotes (as in a content list
 for a drop-down picklist control). :-)

The syntax I described works for any of the valid string delimiters in
Python: single quotes, double quotes, triple single quotes and triple
double quotes, and the adjacent string literals do not need to use the
same delimiter, you can mix and match and they'll still be parsed as
one big string literal.

   I'm used to seeing (and writing) newlines in bash scripts and other text
 so now I know python recognizes it I can use this solution.

The problem with the trailing \ is if someone accidentally types a
space after it, the newline is no longer escaped, and most editors
don't highlight this error, so you get a confusing message from the
interpreter.

Best,

Luciano



 Much appreciated,


 Rich
 ___
 Portland mailing list
 Portland@python.org
 https://mail.python.org/mailman/listinfo/portland



-- 
Luciano Ramalho
|  Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
|  Professor em: http://python.pro.br
|  Twitter: @ramalhoorg
___
Portland mailing list
Portland@python.org
https://mail.python.org/mailman/listinfo/portland


[portland] Python author wants to speak to Portland-PUG and needs sofa for 2 nights

2015-05-11 Thread Luciano Ramalho
Dear Portland Pythonistas,

I am the author of Fluent Python [1] and I'm going to present two
exciting talks at OSCON 2015 (exciting for me, at least...).

[1] http://shop.oreilly.com/product/0636920032519.do

The talks are:

- Plate spinning: Modern concurrency in Python
- Pingo means pin, go!: Universal IoT programming in Python

You can read more about me and the talks at my OSCON speaker page:

http://www.oscon.com/open-source-2015/public/schedule/speaker/150170

I've previously presented at PyCon US, OSCON and many Python community events.

I'd live to present one or both of these talks to your group when I am
in Portland for OSCON 2015 from July 22-24.

I'd also like to extend my stay at Portland until Sunday, July 26th,
so I am looking for a place to stay Friday and Saturday night (July
24, 25).

This is not a trade: the offer to speak at a Portland Meetup while I
am in Portland stands, even if I can't find a place to crash Friday
and Saturday. Our dates would just be a bit more limited.

Cheers,

Luciano



-- 
Luciano Ramalho
|  Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
|  Professor em: http://python.pro.br
|  Twitter: @ramalhoorg
___
Portland mailing list
Portland@python.org
https://mail.python.org/mailman/listinfo/portland


Re: [portland] Python author wants to speak to Portland-PUG and needs sofa for 2 nights

2015-05-11 Thread Luciano Ramalho
Thank you very much, Kirby!

Paul M offered to host me about 11 minutes before your kind message.

I'd love to exchange ideas about Python fluency with you and everyone else!

Even if there is no timely Portland PUG meetup, we could just go out
for a beer and celebrate the international Python community!

Cheers,

Luciano


On Mon, May 11, 2015 at 6:33 PM, kirby urner kirby.ur...@gmail.com wrote:


 I'd live to present one or both of these talks to your group when I am
 in Portland for OSCON 2015 from July 22-24.

 I'd also like to extend my stay at Portland until Sunday, July 26th,
 so I am looking for a place to stay Friday and Saturday night (July
 24, 25).

 This is not a trade: the offer to speak at a Portland Meetup while I
 am in Portland stands, even if I can't find a place to crash Friday
 and Saturday. Our dates would just be a bit more limited.

 Cheers,

 Luciano



 Greetings Luciano --

 I will give you first dibs if I can confirm quarters.  I have a spare
 room that would work well, but then its former occupant, now in
 Nepal may need it for a few days this summer and has yet to
 say exactly when (no round trip booked yet).

 I have a comfortable wood frame house and plan to be attending
 OSCON myself so will be transportation-aware (car or public
 are the two options).  My by-then 21 year-old daughter and
 86-year-old mom also expect quarters during OSCON but
 their space is assured already.  It all depends on Lindsey, an
 avid student of Newar / Devanagari language Buddhism who
 really wants to stay there for some years -- but needs to tie
 off loose ends.

 (Portland has lots of Buddhist temples and stuff so none of
 this is all that surprising).

 In the meantime, the opportunity to enjoy your company would
 be fantastic, Fluent Python a great topic!  So if another Pythonista
 pipes up with a confirmed location, please do accept.  I don't
 want to leave things pending longer than necessary.

 About me:  I work with O'Reilly School of Technology as a
 Python Mentor.  I deal with hundreds of Python questions
 and exercises every week.  I'm very interested in fluency,
 improving mine, improving theirs.

 Kirby Urner





 --
 Luciano Ramalho
 |  Author of Fluent Python (O'Reilly, 2015)
 | http://shop.oreilly.com/product/0636920032519.do
 |  Professor em: http://python.pro.br
 |  Twitter: @ramalhoorg
 
 -- next part --
 An HTML attachment was scrubbed...
 URL: 
 http://mail.python.org/pipermail/portland/attachments/20150511/b5338bbf/attachment.html
 ___
 Portland mailing list
 Portland@python.org
 https://mail.python.org/mailman/listinfo/portland



-- 
Luciano Ramalho
|  Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
|  Professor em: http://python.pro.br
|  Twitter: @ramalhoorg
___
Portland mailing list
Portland@python.org
https://mail.python.org/mailman/listinfo/portland