Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #88169

Re: Supply condition in function call

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Supply condition in function call
Date 2015-03-27 16:00 +0000
References (4 earlier) <b806441f-ea43-48a7-97a2-223cbfd6b8ff@googlegroups.com> <mailman.230.1427421404.10327.python-list@python.org> <c3df4d41-6a40-4fc1-abb2-24fbb74e499e@googlegroups.com> <5514ddee$0$12979$c3e8da3$5496439d@news.astraweb.com> <1a8eccd0-50d7-4eb3-84ec-5c7bbdb34b89@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.270.1427472028.10327.python-list@python.org> (permalink)

Show all headers | View raw


On 27/03/2015 13:48, Rustom Mody wrote:
> On Friday, March 27, 2015 at 10:05:21 AM UTC+5:30, Steven D'Aprano wrote:
>> On Fri, 27 Mar 2015 01:21 pm, Rustom Mody wrote:
>>
>>> Anyway my point is that in python (after 2.2??) saying something is an
>>> object is a bit of a tautology -- ie verbiage without information.
>>
>>
>> Er, it's *always* been a tautology. Every value in Python is an object,
>> including classes, and that has been always the case.
>>
>> However, just because it's a tautology doesn't mean it isn't useful to know.
>> (Tautologies are also known as *facts* and knowing facts is usually a good
>> thing.) For the majority of programming languages, it is not the case that
>> all values are objects, and not all people reading the documentation should
>> be expected to know that this applies to Python.
>
> I am making a point of pedagogy not semantics.
> This is help(filter) for python 2 and 3.
>
> Python2:
> Help on built-in function filter in module __builtin__:
>
> filter(...)
>      filter(function or None, sequence) -> list, tuple, or string
>
>      Return those items of sequence for which function(item) is true.  If
>      function is None, return the items that are true.  If sequence is a tuple
>      or string, return the same type, else return a list.
> --------------------------
>
> Python 3
> Help on class filter in module builtins:
>
> class filter(object)
>   |  filter(function or None, iterable) --> filter object
>   |
>   |  Return an iterator yielding those items of iterable for which function(item)
>   |  is true. If function is None, return the items that are true.
>   |
>   |  Methods defined here:
>   |
>   |  __getattribute__(self, name, /)
>   |      Return getattr(self, name).
>   |
>   |  __iter__(self, /)
>   |      Implement iter(self).
>   |
>   |  __new__(*args, **kwargs) from builtins.type
>   |      Create and return a new object.  See help(type) for accurate signature.
>   |
>   |  __next__(self, /)
>   |      Implement next(self).
>   |
>   |  __reduce__(...)
>   |      Return state information for pickling.
> ------------------------
>
> Try and put yourself in the place of a noob:
>
> Knows some C, not much else.
> Starts studying python.
> Good until a point.
> Then suddenly hit... map, filter, and the worst of all lambda.
> More he reads less he understands.
> Tries help... Gets the above.
>
> So which do you think helps him more python 2 or 3?
>

Can't say it bothers me personally as I never use Python 2 any more. 
What does bother me is the stream of complaints you make about the docs 
or docstrings but there are very few if any tracker issues to get these 
things sorted.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Supply condition in function call Manuel Graune <manuel.graune@koeln.de> - 2015-03-25 18:29 +0100
  Re: Supply condition in function call Joel Goldstick <joel.goldstick@gmail.com> - 2015-03-25 13:41 -0400
    Re: Supply condition in function call Manuel Graune <manuel.graune@koeln.de> - 2015-03-25 18:51 +0100
      Re: Supply condition in function call Joel Goldstick <joel.goldstick@gmail.com> - 2015-03-25 14:17 -0400
      Re: Supply condition in function call Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-25 12:22 -0600
      Re: Supply condition in function call Joel Goldstick <joel.goldstick@gmail.com> - 2015-03-25 14:42 -0400
  Re: Supply condition in function call Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-25 11:44 -0600
    Re: Supply condition in function call Grant Edwards <invalid@invalid.invalid> - 2015-03-25 19:53 +0000
      Re: Supply condition in function call Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-25 14:49 -0600
        Re: Supply condition in function call Grant Edwards <invalid@invalid.invalid> - 2015-03-26 15:41 +0000
  Re: Supply condition in function call Terry Reedy <tjreedy@udel.edu> - 2015-03-25 14:50 -0400
  Re: Supply condition in function call Gary Herron <gherron@digipen.edu> - 2015-03-25 12:13 -0700
    Re: Supply condition in function call Rustom Mody <rustompmody@gmail.com> - 2015-03-25 21:02 -0700
      Re: Supply condition in function call Chris Angelico <rosuav@gmail.com> - 2015-03-26 17:00 +1100
        Re: Supply condition in function call Rustom Mody <rustompmody@gmail.com> - 2015-03-26 18:41 -0700
          Re: Supply condition in function call Chris Angelico <rosuav@gmail.com> - 2015-03-27 12:56 +1100
            Re: Supply condition in function call Rustom Mody <rustompmody@gmail.com> - 2015-03-26 19:21 -0700
              Re: Supply condition in function call Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-27 15:34 +1100
                Re: Supply condition in function call Rustom Mody <rustompmody@gmail.com> - 2015-03-27 06:48 -0700
                Re: Supply condition in function call Chris Angelico <rosuav@gmail.com> - 2015-03-28 01:17 +1100
                Re: Supply condition in function call Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-27 16:00 +0000
                Re: Supply condition in function call Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-28 18:32 +1100
                Re: Supply condition in function call Chris Angelico <rosuav@gmail.com> - 2015-03-28 18:45 +1100
            Re: Supply condition in function call Larry Hudson <orgnut@yahoo.com> - 2015-03-27 17:26 -0700
              Re: Supply condition in function call Rustom Mody <rustompmody@gmail.com> - 2015-03-27 18:27 -0700
              Re: Supply condition in function call Marko Rauhamaa <marko@pacujo.net> - 2015-03-28 09:50 +0200
                Re: Supply condition in function call Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-28 20:17 +1100
                Re: Supply condition in function call Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-28 03:19 -0600
                Re: Supply condition in function call Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-28 20:57 +1100
                Re: Supply condition in function call Cameron Simpson <cs@zip.com.au> - 2015-03-30 09:35 +1100
                Re: Supply condition in function call Manuel Graune <manuel.graune@koeln.de> - 2015-03-30 00:46 +0200
          Re: Supply condition in function call Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-26 20:25 -0600
            Re: Supply condition in function call Rustom Mody <rustompmody@gmail.com> - 2015-03-26 19:46 -0700
    Re: Supply condition in function call Manuel Graune <manuel.graune@koeln.de> - 2015-03-26 07:27 +0100
      Re: Supply condition in function call Cameron Simpson <cs@zip.com.au> - 2015-03-26 18:06 +1100
        Re: Supply condition in function call Manuel Graune <manuel.graune@koeln.de> - 2015-03-27 21:02 +0100
          Re: Supply condition in function call Cameron Simpson <cs@zip.com.au> - 2015-03-28 09:55 +1100
      Re: Supply condition in function call Peter Otten <__peter__@web.de> - 2015-03-26 10:03 +0100
        Re: Supply condition in function call Manuel Graune <manuel.graune@koeln.de> - 2015-03-27 20:46 +0100
          Re: Supply condition in function call Peter Otten <__peter__@web.de> - 2015-03-27 21:38 +0100
  Re: Supply condition in function call smap <askme.first@thankyouverymuch.invalid> - 2015-03-28 08:58 +0000

csiph-web