Prothon Prototypes vs Python Classes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Charles Hixson

    #91
    Re: Prothon Prototypes vs Python Classes

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Charles Hixson wrote:

    | Michael wrote:
    |
    | | They're planning to remove tab indention support in 3.0? I for
    | one | would be pissed off at such a change. I don't mind people
    | using | spaces if they like but I see no reason I shouldn't be able
    | to use | tabs if I like. I can't see how it should make any
    | difference to | Python which you use so why not allow for personal
    | preference? | |> I'll just mention that there are ***very good***,
    | that is |> ***extremely good*** reasons why the Python standard is
    | to use |> spaces for indentation, and why the option of using tabs
    | will be |> removed in 3.0. |> They can't possibly be good enough
    | (for my needs). That said, where can I check this. I don't want
    | to make important decisions on incomplete information.

    Well, I've just checked the cvs source build (version of 2004/03/30),
    and it handles files with tab-based indentation without problem or
    warning. So I suspect that it will continue to do so. (I also
    checked all the PEPs and the BDFL's commentary, and a few other places.)

    I think someone was just spreading FUD. (Quite effectively though, as
    far as I'm concerned.)
    There are good reasons to not mix tab indentation and space
    indentation, and that would cause me no problems. The other though
    (shudder).

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)
    Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

    iD8DBQFAaeEnE1g uSVL8NK8RAvt1AK DmXEzW7w7zFRzjX soEdDooUMg5iACd FtL2
    RAzmwQiE4G1VffB 3B8ecXW8=
    =HE84
    -----END PGP SIGNATURE-----


    Comment

    • Bruno Desthuilliers

      #92
      Re: [OT] about OO concepts

      Hung Jung Lu wrote:
      (snip)
      [color=blue]
      >
      > I think the current way how OOP is taught is kind of bad. The lectures
      > would start with definition of classes, inheritance, virtual
      > functions, etc.
      >[/color]
      (snip)
      [color=blue]
      > I often don't know how to take it when I see people talking about OOP
      > by using definitions like: polymorphism, data hiding, etc. As if these
      > definitions were something of utmost importance.[/color]

      Well, last time I tried to explain OOP I started with the 'object'
      concept (object = id + state + behavior), then came to the 'class'
      concept, first defined as 'a class is the set of objects that share the
      same behavior'. It's hard to tell because no two brains works the same,
      but it seemed that the person I was trying to teach OO found this
      approach quite clear...
      [color=blue]
      > To me, OOP is just a
      > tool for factorizing code, just like using for-loops and using
      > functions to factor out repetitive code. Polymorphism, data hiding,
      > etc. are all secondary features[/color]

      Err... I would not say that polymorphism is 'secondary'. It's IMHO one
      of the most important concepts in OO.

      (snip)
      [color=blue]
      > A CS professor friend of mine once said: "all problems in CS are
      > solved by just one more level of indexing,"[/color]

      IIRC, the exact quote is : "any problem can be solved by adding a level
      of indirection - except for 'too much levels of indirection'" (now don't
      ask me who said this !-)

      Bruno

      Comment

      • Mark Hahn

        #93
        Re: [OT] Top posting is a PITA [was : Prothon Prototypes vs Python Classes]

        > make your posts more readable

        Sorry.

        I really really try to remember to quote from below. If you go through my
        posts you will see that I remember most of the time. The last few days I
        have been reponding to four or five mailing lists after months of only
        coding and my fingers are worn out.



        "Bruno Desthuilliers" <bdesth.quelque chose@free.quel quepart.fr> wrote in
        message news:4069e9d9$0 $8915$636a15ce@ news.free.fr...[color=blue]
        > Peter Hickman wrote:[color=green]
        > > Gerrit wrote:
        > >[color=darkred]
        > >> only one. I think it is the wrong answer to say that people shouldn't
        > >> bitch about top-posting - it _does_ annoy people (including me and[/color][/color][/color]
        Aahz).[color=blue][color=green]
        > >
        > >
        > > Will you please reign in you ego and qualify your statement 'it annoys
        > > *SOME* people'.[/color]
        >
        > Well, it seems that it annoys *most* people here. BTW, I was about to do
        > the same... (Mark, if you read us : your work seems pretty interesting,
        > so do *yourself* a favor and make your posts more readable !-).
        >[color=green]
        > > I find all the bitching about top posting to be a
        > > greater distraction than top posting itself![/color]
        >
        > So please stop bitching about people bitching about top-posting.
        >[color=green][color=darkred]
        > >> There are conventions on usenet (and mailing lists), and they are there
        > >> with reason. I would like to kindly ask you to try to do more
        > >> 'bottom-posting'. It makes your postings easier and prettier to read.[/color]
        > >
        > > I find bottom posting to be a real pain as when I look at a new message
        > > it defaults to showing me the top of the message and I then have to
        > > scroll through pages of quoted posts that I have already read just to
        > > read one or two lines stuck at the bottom.[/color]
        >
        > If you have to do so, then the poster didn't get point : only quote
        > what's needed.
        >
        > (snip)
        >[color=green]
        > >
        > > I have never left a group because of the trolls.
        > > I have never left a group because of the noobies.
        > > I have left a group because of the constant whining about top posting.[/color]
        >
        > May I suggest you to count how many messages Mark posted here before
        > someone kindly suggested that he could help everyone by doing a simple
        > thing ? If that's what you call 'constant whining', then you are the[/color]
        troll.[color=blue]
        >[color=green]
        > > People who whine on about 'top posting' are the sort of people who draft
        > > 'clean desk' policies. If you want to whine about top posting then start
        > > alt.whine.top.p osting and have fun.[/color]
        >
        > Après vous, mon cher.
        >
        > Bruno
        >[/color]


        Comment

        • Michael

          #94
          Re: [OT] about OO concepts

          [color=blue]
          > Well, last time I tried to explain OOP I started with the 'object'
          > concept (object = id + state + behavior), then came to the 'class'
          > concept, first defined as 'a class is the set of objects that share
          > the same behavior'. It's hard to tell because no two brains works the
          > same, but it seemed that the person I was trying to teach OO found
          > this approach quite clear...[/color]

          I always teach the object concept by putting objects into real world
          terms. An object is a car, cup, or bowling ball. Each has properties
          that help define what the object is. Color, weight, or size. Each also
          has methods which are things which the object can do. Start it's engine,
          be sipped from, or be rolled. Even novice programmers can pick that
          concept up pretty easily. Classes take a little more work. Just
          explaining that there could be different types of cars which in turn are
          different types of vehicles but that certain design aspects are often
          the same. I just explain a class as being a design for an object and
          that when you instantate an objectit's like manufacturing something from
          a design. Most people grasp the idea pretty quickly when put into such
          non-abstract terms. I might explain polymorphism as something like
          different brands of the same item. Your car can use generic tires that
          cost $50 or stylishh tires that cost $500. As long as they follow
          certain design rules they are interchangable parts but they can differ
          greatly outside those rules.

          Maybe it's underestimating people but I think a lot of novices don't
          really understand the abstract ideas we throw at them. I see even
          somewhat experienced coders still avoiding using such things as
          functions and objects. Clearly not good. :)

          Comment

          • Skip Montanaro

            #95
            Re: tabbing probs


            Michael> An editor is crappy if it inserts anything other than what you
            Michael> type into the code. If I press tab and four spaces are
            Michael> inserted that is crap.

            Not if that's what I asked it to do. I have python-mode in Emacs set to use
            4-space indents and only insert SPACE characters, not TAB characters.
            Pressing the TAB key while the cursor is at the beginning of line inserts or
            deletes enough SPACEs to put the cursor at the correct indentation for the
            current line (based upon the indentation and content of the previous line).

            Michael> If I press 'A' and 'a' is inserted that is crap.

            not if I placed my editor in e.e. cummings mode...

            Michael> To me, it sounds as if this entire issue is caused by crappy
            Michael> editors that think they know better than the programmers.

            It has nothing to do with the editors considered in isolation. By in large
            they are doing exactly what the programmers ask them to do. The problem is
            with the interchange of program files between unlike systems (via whatever
            means: email, CVS checkins, grabbing from a web page, etc) which have tools
            (editors in particular) which interpret TAB characters differently based
            upon how the programmers have configured them. To the best of my knowledge
            no systems interpret SPACE characters in weird ways, so using them to
            indicate indentation is the only foolproof solution.

            Skip

            Comment

            • Michele Simionato

              #96
              Re: Prothon Prototypes vs Python Classes

              Peter Hickman <peter@semantic o.com> wrote in message news:<4069a001$ 0$4237$afc38c87 @news.easynet.c o.uk>...[color=blue]
              > I have never left a group because of the trolls.
              > I have never left a group because of the noobies.
              > I have left a group because of the constant whining about top posting.[/color]

              Then maybe you should consider leaving c.l.py ?

              Michele Simionato

              Comment

              • JanC

                #97
                Re: [OT] Top posting is a PITA [was : Prothon Prototypes vs Python Classes]

                "Mark Hahn" <mark@prothon.o rg> schreef:
                [color=blue]
                > I really really try to remember to quote from below. If you go through my
                > posts you will see that I remember most of the time. The last few days I
                > have been reponding to four or five mailing lists after months of only
                > coding and my fingers are worn out.[/color]

                Try OE-QuoteFix, it can help you, and it's free:
                <http://home.in.tum.de/~jain/software/oe-quotefix/>

                Also, I think OE allows you to select the text-to-quote _before_ replying.

                --
                JanC

                "Be strict when sending and tolerant when receiving."
                RFC 1958 - Architectural Principles of the Internet - section 3.9

                Comment

                • Hamilcar Barca

                  #98
                  Re: Prothon Prototypes vs Python Classes

                  In article <Sz8ac.68272$cx 5.62681@fed1rea d04> (Mon, 29 Mar 2004 22:36:55
                  -0800), Mark Hahn wrote:
                  [color=blue]
                  > A2. People that bitch about top-posting.[/color]

                  A3. People professing to be computer literate -- some claiming to be
                  programming language designers and wanting to be taken seriously -- who
                  refuse to understand why top-posting doesn't follow the rules of written
                  European language.

                  A4. People who refuse to trim unnecessary quoted material from their
                  follow-ups.

                  --
                  "Posting at the top because that's where the cursor happened to
                  be is like shitting in your pants because that's where your
                  asshole happened to be."
                  -- Andreas Prilop (c.i.w.a.h)

                  Comment

                  • Michael

                    #99
                    Re: tabbing probs

                    [color=blue]
                    >Not if that's what I asked it to do. I have python-mode in Emacs set to use
                    >4-space indents and only insert SPACE characters, not TAB characters.
                    >Pressing the TAB key while the cursor is at the beginning of line inserts or
                    >deletes enough SPACEs to put the cursor at the correct indentation for the
                    >current line (based upon the indentation and content of the previous line).
                    >
                    >[/color]
                    If you tell it to do that then that's fine. But then if you can do that
                    then why can't you just tell the editor to handle tabs as tabs? The
                    whole discussion being about why tabs should be removed because some
                    editors are to stupid to handle them correctly, or maybe just some
                    programmers are to stupid to tell their editor how to handle tabs. If
                    you can tell the editor to not allow mixing of spaces and tabs then the
                    entire issue would be moot.
                    [color=blue]
                    >not if I placed my editor in e.e. cummings mode...
                    >
                    >[/color]
                    That'd be rather funny. It reminds me of the time I wrote a projects
                    documentation in Suess-like language.
                    [color=blue]
                    >It has nothing to do with the editors considered in isolation. By in large
                    >they are doing exactly what the programmers ask them to do. The problem is
                    >with the interchange of program files between unlike systems (via whatever
                    >means: email, CVS checkins, grabbing from a web page, etc) which have tools
                    >(editors in particular) which interpret TAB characters differently based
                    >upon how the programmers have configured them. To the best of my knowledge
                    >no systems interpret SPACE characters in weird ways, so using them to
                    >indicate indentation is the only foolproof solution.
                    >
                    >[/color]
                    I have experienced the problem of cutting and pasting from some apps
                    where tabs are replaced as spaces. Annoying, but still an error in those
                    apps and not in Python. On the rare occassion that happens I just fix
                    the code. I would like if Python could spit out warnings where tabs and
                    spaces were mixed. That'd be a handy alert in cases where I might forget
                    to fix a line.

                    I can see that the mishandling of tabs by certain apps is annoying. I
                    just don't see how adding Python to that list will be any less annoying.

                    Comment

                    • Greg Ewing (using news.cis.dfn.de)

                      Re: Prothon Prototypes vs Python Classes

                      Peter Hickman wrote:[color=blue]
                      > I find bottom posting to be a real pain as when I look at a new message
                      > it defaults to showing me the top of the message and I then have to
                      > scroll through pages of quoted posts that I have already read just to
                      > read one or two lines stuck at the bottom.[/color]

                      That's equally bad. The issue isn't about so-called "top-posting"
                      vs. "bottom-posting". The issue is that you should only be
                      quoting SMALL amounts of the original post -- just enough to
                      establish a context for what you're about to say.

                      Then people don't have to scroll either way to find the
                      new content.

                      (You will notice that I did not quote any more of the original
                      message, either at the top or the bottom.)

                      --
                      Greg Ewing, Computer Science Dept,
                      University of Canterbury,
                      Christchurch, New Zealand


                      Comment

                      • Greg Ewing (using news.cis.dfn.de)

                        Re: Prothon Prototypes vs Python Classes

                        Michael wrote:[color=blue]
                        > If you're making a short response to the entire message it's okay to top
                        > post.[/color]

                        I wouldn't consider it appropriate even then. In that situation
                        I usually pick some distinctive sentence from the original and
                        quote that -- just to remind people of the context, not to
                        reproduce it in toto.

                        --
                        Greg Ewing, Computer Science Dept,
                        University of Canterbury,
                        Christchurch, New Zealand


                        Comment

                        • Ben Finney

                          Re: Prothon Prototypes vs Python Classes

                          On Tue, 30 Mar 2004 22:40:34 -0700, Hamilcar Barca wrote:[color=blue]
                          > top-posting doesn't follow the rules of written European language.[/color]

                          I don't know why you feel the need to qualify that; I don't know of
                          *any* human writing system in current use where a discussion proceeds
                          from the bottom to the top. So:

                          top-posting doesn't follow the rules of written language.

                          seems stronger to me.

                          --
                          \ "When I turned two I was really anxious, because I'd doubled my |
                          `\ age in a year. I thought, if this keeps up, by the time I'm six |
                          _o__) I'll be ninety." -- Steven Wright |
                          Ben Finney <http://bignose.squidly .org/>

                          Comment

                          • Mark Hahn

                            Re: [OT] Top posting is a PITA [was : Prothon Prototypes vs Python Classes]

                            I just downloaded it. I'll give it a try.

                            "JanC" <usenet_spam@ja nc.invalid> wrote in message
                            news:Xns94BD467 AF47A5JanC@213. 119.4.35...[color=blue]
                            > "Mark Hahn" <mark@prothon.o rg> schreef:
                            >[color=green]
                            > > I really really try to remember to quote from below. If you go through[/color][/color]
                            my[color=blue][color=green]
                            > > posts you will see that I remember most of the time. The last few days I
                            > > have been reponding to four or five mailing lists after months of only
                            > > coding and my fingers are worn out.[/color]
                            >
                            > Try OE-QuoteFix, it can help you, and it's free:
                            > <http://home.in.tum.de/~jain/software/oe-quotefix/>
                            >
                            > Also, I think OE allows you to select the text-to-quote _before_ replying.
                            >
                            > --
                            > JanC
                            >
                            > "Be strict when sending and tolerant when receiving."
                            > RFC 1958 - Architectural Principles of the Internet - section 3.9[/color]


                            Comment

                            • Max M

                              Re: [OT] Top posting is a PITA [was : Prothon Prototypes vs PythonClasses]

                              Bruno Desthuilliers wrote:
                              [color=blue]
                              > Peter Hickman wrote:
                              >[color=green]
                              >> People who whine on about 'top posting' are the sort of people who
                              >> draft 'clean desk' policies. If you want to whine about top posting
                              >> then start alt.whine.top.p osting and have fun.[/color][/color]


                              That is not quite right. Using top posting forces every reader to
                              unlearn a lifetime of knowledge about narrative flow in content.

                              Left-right - top-down

                              That's how we are reading and writing in most western cultures. For me
                              that's about 40 years of habbit. And it takes a lot of mental effort to
                              read.

                              You could just as well expect that we start reading from right to left.
                              Exactly the same thing.

                              ..too confusing pretty is that And


                              regards Max M

                              Comment

                              • Michael

                                Re: [OT] Top posting is a PITA [was : Prothon Prototypes vs PythonClasses]

                                top.
                                to
                                bottom
                                read
                                to
                                learn
                                to
                                you
                                forcing
                                be
                                would
                                this
                                No,
                                [color=blue]
                                > That is not quite right. Using top posting forces every reader to
                                > unlearn a lifetime of knowledge about narrative flow in content.
                                >
                                > Left-right - top-down
                                >
                                > That's how we are reading and writing in most western cultures. For me
                                > that's about 40 years of habbit. And it takes a lot of mental effort
                                > to read.
                                >
                                > You could just as well expect that we start reading from right to
                                > left. Exactly the same thing.
                                >
                                > .too confusing pretty is that And[/color]

                                With top posting you're still reading the same way. You shouldn't even
                                need to read the quoted text below. It's only there to help keep the
                                structure of the conversation recorded. You read the relevant parts of a
                                document first and since we are, as you said, used to reading top-down
                                that means the relevant parts are highest on the page. The same way we
                                read a title and opening paragraph before reading the rest of a document.

                                Comment

                                Working...