Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Prototype OO
sam a écrit :
> Bruno Desthuilliers napisa³(a):
> 
> 
> 
>
> I think I will get back to this discussion after learning "descriptor
> protocol"

Add lookup (name resolution) rules, metaclasses, 'magic' methods etc to
the list then, so you'll get a general view of Python's object model.

> and maybe I will not talk about syntax then, and maybe it
> won't get off topic.
>
> As you can see I'm novice in Python, but I can show python-experts some
> newbie opinions. If somebody is an expert then he can't take a fresh
> look at his many years work.

This is indeed true. But be assured their are quite a few newbies
(whether  nwebie to Python or newbie to programming) posting here to
comment on what they perceive as warts - sometimes making good points,
sometimes just not knowing enough about the language's inners and/or
philosophy to understand why what they think is a wart is considered a
feature by more "advanced" users. As some other contributor (hi Diez !)
to this thread already mentionned, "Is [Python] perfect? Heck no! But it
sure is fun enough to deal with the occasional wart."


Report this thread to moderator Post Follow-up to this message
Old Post
Bruno Desthuilliers
04-03-08 11:29 AM


Re: Prototype OO
On 3 avr, 10:32, sam <s...@mas.pl> wrote:
> Bruno Desthuilliers napisa=B3(a):
> 
>
> I think I will get back to this discussion after learning "descriptor prot=[/color
]
ocol"
> and maybe I will not talk about syntax then, and maybe it won't get off to=[/color
]
pic.

may I recommend this http://www.cafepy.com/article/ (the first 2)?

Report this thread to moderator Post Follow-up to this message
Old Post
olive
04-03-08 11:29 AM


Re: Prototype OO
On Thu, 03 Apr 2008 10:07:38 +0200, sam wrote:

> bruno.desthuilliers@gmail.com napisał(a):
>
> 
> 
>
> And people start asking why this is that or the other way in Python, and y
ou
> can't give a good answer to newcomers, especially if Python was chosen as 
a
> first learning language. You can't tell "because Python's parsing mechanis
m
> don't allow statements in expressions...".

But one can tell "because the way Python's syntax is based on indentation,
no one has come up with a syntax for anonymous functions without the
limitations of the current ``lambda``, that doesn't need 'curly braces' and
is still as readable as Python is now."

Ciao,
Marc 'BlackJack' Rintsch

Report this thread to moderator Post Follow-up to this message
Old Post
Marc 'BlackJack' Rintsch
04-03-08 11:29 AM


Re: Prototype OO
En Thu, 03 Apr 2008 05:20:48 -0300, sam <sam@mas.pl> escribió:

> Gabriel Genellina napisał(a):
> 
>
> Actually I don't know what is "descriptor protocol", so maybe I should
> have
> finished discussing. I will aslo search for "self magic" -- some pieces
> of old
> code, or something.

I meant the way instance methods acquire their "self" argument; the
transformation from someobject.foo(arg1,arg2) into
(ClassOfSomeobject.foo)(someobject, arg1, arg2) that classic classes do
themselves and could not be changed nor extended. The descriptor protocol
provides a way for attributes to modify the way they're handled; this is
how instance methods get their self argument, and allows for the existence
of class methods, static methods, and properties, among other things.
The descriptor protocol is very important for Python and understanding it
is a good idea, but not before you are rather fluent with the language or
it will be fairly incomprehensible.

--
Gabriel Genellina


Report this thread to moderator Post Follow-up to this message
Old Post
Gabriel Genellina
04-03-08 01:44 PM


Sponsored Links




Last Thread Next Thread Next
Pages (5): « 1 2 3 4 [5]
Search this forum -> 
Post New Thread

Python archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:55 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.