On Thu, 02 Apr 2009 17:02:30 +0100, David C. Ullrich
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
--
http://mail.python.org/mailma
; To: python-list@python.org
> Subject: Introducing Python to others
>
> 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
In article ,
"andrew cooke" wrote:
> David C. Ullrich wrote:
> > In article ,
> > Scott David Daniels wrote:
[...]
> >>
> >> class Vector(list):
> >> def __add__(self, other):
> >> return type(self)(x + y for x, y in zip(self, other))
> >
> > Question: I would have t
David C. Ullrich wrote:
> In article ,
> Scott David Daniels wrote:
>
>> Mensanator wrote:
>> > On Mar 26, 11:42 am, "andrew cooke" wrote:
>> >> ...
>> >> that's cute, but if you show them 2.6 or 3 it's even cuter:
>> >>
>> > from operator import add
>> > class Vector(list):
>> >> ...
In article ,
Scott David Daniels wrote:
> Mensanator wrote:
> > On Mar 26, 11:42 am, "andrew cooke" 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):
> >> ...
In article
<039360fb-a29c-4f43-b6e0-ba97fb598...@z23g2000prd.googlegroups.com>,
Mensanator wrote:
> On Mar 26, 11:42 am, "andrew cooke" wrote:
> > David C. Ullrich wrote:
> > > In article ,
> > > "Paddy O'Loughlin" wrote:
> >
> > > Here's my favorite thing about Python (you'd of course
> > >
On Mar 26, 10:35 am, "Paddy O'Loughlin"
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 application
in 2-3 minutes
Small additions:
On Mar 26, 7:35 pm, "J. Cliff Dyer" 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, 6:35 am, "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.
>
> Ther
Rhodri James wrote:
> On Thu, 26 Mar 2009 09:35:55 -, Paddy O'Loughlin
> 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
On Thu, 26 Mar 2009 09:35:55 -, Paddy O'Loughlin
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 could
think of.
Once you've sh
On Mar 26, 4:32 pm, Jervis Whitley 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
>
>> 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)
>
Mensanator wrote:
On Mar 26, 11:42 am, "andrew cooke" 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]
What would yo
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
Thanks for all your replies.
A lot of very strong answers :)
2009/3/26 Mensanator :
> 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 "x+x", you
Mensanator wrote:
> On Mar 26, 11:42 am, "andrew cooke" wrote:
>> David C. Ullrich wrote:
>> > In article ,
>> > "Paddy O'Loughlin" 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 understo
On Thu, 26 Mar 2009 12:42:01 -0400 (CLT)
"andrew cooke" 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
On Mar 26, 11:42 am, "andrew cooke" wrote:
> David C. Ullrich wrote:
> > In article ,
> > "Paddy O'Loughlin" 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):
>
> >
David C. Ullrich wrote:
> In article ,
> "Paddy O'Loughlin" 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
>
> class Vector():
> def __init__
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
In article ,
"Paddy O'Loughlin" 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
class Vector():
def __init__(self, data):
self.data = data
def __rep
Hendrik van Rooyen wrote:
"Paddy O'Loughlin" 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 t
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 th
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 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? Ch
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
"Paddy O'Loughlin" 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 set up a server
and a c
On Mar 26, 2:35 am, "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.
>
> Ther
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.
There's not going to be a whole lot of structure to it. First, I
30 matches
Mail list logo