On Thu, 2007-10-25 at 15:17 +0000, bramble wrote: > On Oct 25, 10:38 am, Dan Ellis <[EMAIL PROTECTED]> wrote: [...] > It would be trivial to just add a short sentence in the tutorial > saying something like, "Behind the scenes, Django sets things up such > that you automatically get instance variables for each of the class > variables you've set up.". Small price to pay for removing some > mystery, IMO.
Actually, it would be a fairly bad idea for the tutorial and would actually *introduce* more mystery, on balance. Experience has shown that a lot of people work through the tutorial before they have a completely firm grasp on Python. Bringing up the subtle differences between class and instance variables, which doesn't really affect how you use them at all in any case, would be adding extra complexity where it adds no value. If you have sufficient Python experience that you (a) notice this right off the bat and (b) care about why, it's fairly easy to track down by looking at the Model class or searching on Google. It just isn't necessary to know this information to use Django and so it's not appropriate for the initial tutorial. You haven't made a convincing argument that this knowledge is required to use the code or even makes it easier to use. Currently we say "define these attribute and then assign to them and read from them". It can't get much simpler than that in an introductory document. There's a whole bunch of "what goes on under the covers" stuff that we could write (in fact, the model initialisation process is documented in the wiki -- see [1]). At the moment, we're focusing more on documenting the public API, rather than the "how", since it's Python source code after all -- if you care how things work, it's not too hard to just read the source and grep around a bit. [1] http://code.djangoproject.com/wiki/DevModelCreation Regards, Malcolm -- Works better when plugged in. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---