Adding print-style function calls, and preproc plugins

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Thu Aug 30 06:01:06 EDT 2001


Thu, 30 Aug 2001 09:39:21 +0200, Alex Martelli <aleax at aleax.it> pisze:

> And of course there's no problem interpreting whether:
> 
>     blobber plikke
> 
> means:
> 
>     blobber(plikke)
> 
> or:
> 
>     blobber(plikke())

BTW, from Perl sources:

/*
 * S_intuit_method
 *
 * Does all the checking to disambiguate
 *   foo bar
 * between foo(bar) and bar->foo.  Returns 0 if not a method, otherwise
 * FUNCMETH (bar->foo(args)) or METHOD (bar->foo args).
 *
 * First argument is the stuff after the first token, e.g. "bar".
 *
 * Not a method if bar is a filehandle.
 * Not a method if foo is a subroutine prototyped to take a filehandle.
 * Not a method if it's really "Foo $bar"
 * Method if it's "foo $bar"
 * Not a method if it's really "print foo $bar"
 * Method if it's really "foo package::" (interpreted as package->foo)
 * Not a method if bar is known to be a subroutne ("sub bar; foo bar")
 * Not a method if bar is a filehandle or package, but is quoted with
 *   =>
 */

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list