In article mailman.3007.1238515574.11746.python-l...@python.org,
andrew cooke and...@acooke.org wrote:
David C. Ullrich wrote:
In article tm6dnzxrviq0qfbunz2dnuvz_rmdn...@pdx.net,
Scott David Daniels scott.dani...@acm.org wrote:
[...]
class Vector(list):
def
When doing the same thing, I like
Using a dictionary to return a function or a class definition based on a
msg id and let that returned value handle the message that contained
the id. Something like
Class XYZ:
...
MyHandlers = {42:XYZ, ...
Message = read_from_somewhere_else()
On Thu, 02 Apr 2009 17:02:30 +0100, David C. Ullrich
dullr...@sprynet.com wrote:
Sometime I gotta get around to actually learning this 2.x
stuff. Thought I had an idea how 1.x worked...
3.x may come as a bit of a surprise :-)
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
In article
039360fb-a29c-4f43-b6e0-ba97fb598...@z23g2000prd.googlegroups.com,
Mensanator mensana...@aol.com wrote:
On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote:
David C. Ullrich wrote:
In article mailman.2701.1238060157.11746.python-l...@python.org,
Paddy O'Loughlin
In article tm6dnzxrviq0qfbunz2dnuvz_rmdn...@pdx.net,
Scott David Daniels scott.dani...@acm.org wrote:
Mensanator wrote:
On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote:
...
that's cute, but if you show them 2.6 or 3 it's even cuter:
from operator import add
class
David C. Ullrich wrote:
In article tm6dnzxrviq0qfbunz2dnuvz_rmdn...@pdx.net,
Scott David Daniels scott.dani...@acm.org wrote:
Mensanator wrote:
On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote:
...
that's cute, but if you show them 2.6 or 3 it's even cuter:
from operator
On Mar 26, 10:35 am, Paddy O'Loughlin patrick.olough...@gmail.com
wrote:
If I were to do a (very) short demonstration one web framework for the
PHP devs, what should I use?
No question: use web2py. See the website and the videos that
demonstrate it. You could build a reasonably substantial
Small additions:
On Mar 26, 7:35 pm, J. Cliff Dyer j...@sdf.lonestar.org wrote:
2) Aliasing imports is also cool. Show people how easy it is to switch
from
import MySQLdb as db
to
import psycopg2 as db
and have all your dbapi2 code still work. Or from
from StringIO import StringIO
On Mar 26, 2:35 am, Paddy O'Loughlin patrick.olough...@gmail.com
wrote:
Hi,
As our resident python advocate, I've been asked by my team leader to
give a bit of a presentation as an introduction to python to the rest
of our department.
It'll be less than an hour, with time for taking questions
Paddy O'Loughlin patrick.olough...@gmail.com wrote:
Any other suggestions for a possible wow reaction from an audience like
that?
two simple demos:
The first one is a simple client server thingy on the LAN.
I have seen hardened people do a double take
when they see how little code it takes to
On Thu, Mar 26, 2009 at 9:35 AM, Paddy O'Loughlin
patrick.olough...@gmail.com wrote:
Hi,
As our resident python advocate, I've been asked by my team leader to
give a bit of a presentation as an introduction to python to the rest
of our department.
It'll be less than an hour, with time for
Paddy O'Loughlin a écrit :
(snip)
Anything else you think could make PHP developers starting think that
python is a better choice?
The debugger ?-) (debugging PHP code is kind of nightmare).
If I were to do a (very) short demonstration one web framework for the
PHP devs, what should I use?
Paddy O'Loughlin wrote:
All of the audience will be experienced (4+ years) programmers, almost
all of them are PHP developers (2 others, plus myself, work in C, know
C#, perl, java, etc.).
Show them the same classical design patterns in Java and Python. Explain
how it's much more flexible.
Paddy,
I've tried to categorize some ideas for your presentation. Note that the
ideas within each category are ordered by my random stream of
conscience vs. prioritized in some logical order.
Good luck with your presentation! (BTW: It would be great if you could
share your final outline with
Hendrik van Rooyen wrote:
Paddy O'Loughlin patrick.olough...@gmail.com wrote:
Any other suggestions for a possible wow reaction from an audience like
that?
two simple demos:
The first one is a simple client server thingy on the LAN.
I have seen hardened people do a double take
when they see
In article mailman.2701.1238060157.11746.python-l...@python.org,
Paddy O'Loughlin patrick.olough...@gmail.com wrote:
Here's my favorite thing about Python (you'd of course
remark that it's just a toy example, doing everything
in as dumb but easily understood way as possible):
x=[1,2]
print x+x
On Thu, 2009-03-26 at 09:35 +, Paddy O'Loughlin wrote:
Hi,
As our resident python advocate, I've been asked by my team leader to
give a bit of a presentation as an introduction to python to the rest
of our department.
It'll be less than an hour, with time for taking questions at the end.
David C. Ullrich wrote:
In article mailman.2701.1238060157.11746.python-l...@python.org,
Paddy O'Loughlin patrick.olough...@gmail.com wrote:
Here's my favorite thing about Python (you'd of course
remark that it's just a toy example, doing everything
in as dumb but easily understood way as
On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote:
David C. Ullrich wrote:
In article mailman.2701.1238060157.11746.python-l...@python.org,
Paddy O'Loughlin patrick.olough...@gmail.com wrote:
Here's my favorite thing about Python (you'd of course
remark that it's just a toy
On Thu, 26 Mar 2009 12:42:01 -0400 (CLT)
andrew cooke and...@acooke.org wrote:
that's cute, but if you show them 2.6 or 3 it's even cuter:
from operator import add
class Vector(list):
... def __add__(self, other):
... return map(add, self, other)
...
x = Vector([1,2])
x+x
[2,
Mensanator wrote:
On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote:
David C. Ullrich wrote:
In article mailman.2701.1238060157.11746.python-l...@python.org,
Paddy O'Loughlin patrick.olough...@gmail.com wrote:
Here's my favorite thing about Python (you'd of course
remark that
Thanks for all your replies.
A lot of very strong answers :)
2009/3/26 Mensanator mensana...@aol.com:
What would you have to do to make this work?
x+x+x # expecting [3,6]
[2, 4, 1, 2]
What's happening is that the call to map() is returning a list object.
So after it calculates the first
Apart from the other suggestions that have been made already,
it could be very wow-provoking if you have a nice example using ctypes
to interface to existing c libraries.
Python shines as a glue language too :-)
--irmen
--
http://mail.python.org/mailman/listinfo/python-list
Mensanator wrote:
On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote:
...
that's cute, but if you show them 2.6 or 3 it's even cuter:
from operator import add
class Vector(list):
... def __add__(self, other):
... return map(add, self, other)
... x = Vector([1,2])
x+x
[2, 4]
class Vector(list):
... def __add__(self, other):
... return map(add, self, other)
... x = Vector([1,2])
I've used the complex type for a similar problem (2D Cartesian points)
in the past, I saw the suggestion
once on the pygame list.
x = complex(1,2)
x + x
(2 + 4j)
On Mar 26, 4:32 pm, Jervis Whitley jervi...@gmail.com wrote:
class Vector(list):
... def __add__(self, other):
... return map(add, self, other)
... x = Vector([1,2])
I've used the complex type for a similar problem (2D Cartesian points)
in the past, I saw the suggestion
once on
On Thu, 26 Mar 2009 09:35:55 -, Paddy O'Loughlin
patrick.olough...@gmail.com wrote:
Because of this, I was thinking of making sure I included exceptions
and handling, the richness of the python library and a pointing out
how many modules there were out there to do almost anything one
Rhodri James wrote:
On Thu, 26 Mar 2009 09:35:55 -, Paddy O'Loughlin
patrick.olough...@gmail.com wrote:
Because of this, I was thinking of making sure I included exceptions
and handling, the richness of the python library and a pointing out
how many modules there were out there to do
On Mar 26, 6:35 am, Paddy O'Loughlin patrick.olough...@gmail.com
wrote:
Hi,
As our resident python advocate, I've been asked by my team leader to
give a bit of a presentation as an introduction to python to the rest
of our department.
It'll be less than an hour, with time for taking questions
29 matches
Mail list logo