zooko <[EMAIL PROTECTED]> writes:
> I'm willing to bet that you will get the following answers:
>
> A1. foo [from 'import foo'] is a module.
>
> A2. bar [of 'bar-1.2.3.tar.gz'] is a package.
>
> A3. A distribution is a version of Linux that comes with a lot of
> Free Software.
>
>
> Unfort
"zooko" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Folks:
| Unfortunately these answers aren't quite right. A "package" is
| actually a directory containing an __init__.py file, and a
| distribution is actually what you think of when you say "package" --
| a reusable package o
On 10:53 pm, [EMAIL PROTECTED] wrote:
zooko wrote:
Unfortunately these answers aren't quite right. A "package" is
actually a directory containing an __init__.py file, and a
distribution is actually what you think of when you say "package" -- a
reusable package of Python code that you can,
zooko wrote:
Folks:
Here's an experiment you can perform. Round up a Python programmer and
ask him the following three questions:
Q1. You type "import foo" and it works. What kind of thing is foo?
foo is a package or a module. Not enough information is provide here to
say which.
Q2.
zooko wrote:
Folks:
Here's an experiment you can perform. Round up a Python programmer and
ask him the following three questions:
Q1. You type "import foo" and it works. What kind of thing is foo?
Q2. You go to the Python package index and download something named
"bar-1.0.0.tar.gz". W
On Wed, Apr 30, 2008 at 04:21:13PM -0600, zooko wrote:
> so perhaps instead the implementors should start using the
> terminology understood by the programmers:
>
> 1. A "module" shall henceforth be the name for either a foo.py file
> (a single-file module), or a directory with an __init__.py
Folks:
Here's an experiment you can perform. Round up a Python programmer
and ask him the following three questions:
Q1. You type "import foo" and it works. What kind of thing is foo?
Q2. You go to the Python package index and download something named
"bar-1.0.0.tar.gz". What kind of
The staticmethod thing isn't new; that's also the case in 2.x.
The super() thing is a case of practicality beats purity. Note that
you pay a small but measurable cost for the implicit __class__ (it's
implemented as a "cell variable", the same mechanism used for nested
scopes) so we wouldn't want t
Hi all,
I blogged about that topic today which turned out to be a very bad idea,
so I summarize it for the mailinglist here to hopefully start a discussion
about the topic, which I think is rather important.
In the last weeks something remarkable happened in the Python3 sources:
self kinda became
On Wed, Apr 30, 2008 at 2:17 PM, Christian Heimes <[EMAIL PROTECTED]> wrote:
> As you all know modules don't support properties. However several places
> and modules could use properties on module level. For example the
> sys.py3k_warnings flag could be implemented with a property. Other flags
>
Hello all,
test_math is currently failing on the Debian/alpha buildbots (trunk and
py3k).
I've been trying, unsuccessfully, to figure out what's going wrong, and I'm
starting to run out of ideas, so I thought I'd ask the list for help to see
if
anyone has any useful suggestions.
Details of the fai
Benjamin Peterson schrieb:
> Good idea. Perhaps eventually they could be extended to Python, but
> they are definitely useful in C now. How about passing a list of
> getsets to PyImport_InitModule(5)?
Yeah, I've a similar idea with PyImport_InitModule5() and a list of
structs containing name, gett
Hi!
My name is Heiko N. Weinen and I was accepted as GSoC Student, too. Hoorray!
The project i chose is about Filesystem Virtualisation for Python's Standard
Library,
hopefully something which will prove quite useful. :)
Christian Heimes is my Mentor and I'd like to thank him right now for his h
On Wed, Apr 30, 2008 at 4:17 PM, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Hello Python Dev!
>
> As you all know modules don't support properties. However several places
> and modules could use properties on module level. For example the
> sys.py3k_warnings flag could be implemented with a p
Hello Python Dev!
As you all know modules don't support properties. However several places
and modules could use properties on module level. For example the
sys.py3k_warnings flag could be implemented with a property. Other flags
in the sys module could benefit from read only properties, too.
How
> This leaves us with a few options:
5. Reuse/Abuse Num(object) for arbitrary constants.
AFAICT, this should work out of the box.
> 1. A new AST expr node for constant values for types other than Str/Num
>
> I imagine this to be something like Const(PyObject* v), which is
> effectively transl
On Wed, 30 Apr 2008 09:51:25 -0700, Guido van Rossum <[EMAIL PROTECTED]> wrote:
On Wed, Apr 30, 2008 at 9:36 AM, Farshid Lashkari <[EMAIL PROTECTED]> wrote:
I was just curious as to why cStringIO objects don't implement the
buffer interface. cStringIO objects seem similar to string and array
On Wed, Apr 30, 2008 at 2:07 PM, Trent Nelson <[EMAIL PROTECTED]> wrote:
>
> > This one will not work.
> >
> > >>> 'windows' in System.getProperty('os.name').lower()
> > Traceback (innermost last):
> > File "", line 1, in ?
> > TypeError: string member test needs char left operand
> > >>>
> This one will not work.
>
> >>> 'windows' in System.getProperty('os.name').lower()
> Traceback (innermost last):
> File "", line 1, in ?
> TypeError: string member test needs char left operand
> >>>
Interesting, which version of Jython were you using?
> You may have to do something like
> Sy
On Wed, Apr 30, 2008 at 1:42 PM, Trent Nelson <[EMAIL PROTECTED]> wrote:
> > if os.name == "nt":
> > _socketmethods = _socketmethods + ('ioctl',)
> > +_is_windows = True
> > +elif os.name == 'java':
> > +from java.lang import System
> > +_is_windows = 'windows' in System.getP
On Wed, Apr 30, 2008 at 3:15 AM, Thomas Lee <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've been working on optimization of the AST, including the porting of the
> old bytecode-level optimizations to the AST level. A few questions have come
> up in the process of doing this, all of which are probabl
> if os.name == "nt":
> _socketmethods = _socketmethods + ('ioctl',)
> +_is_windows = True
> +elif os.name == 'java':
> +from java.lang import System
> +_is_windows = 'windows' in System.getProperty('os.name').lower()
> +elif os.name == 'posix' and sys.platform == 'cygwin':
> +
> > Giampaolo Rodola' wrote:
> > > Maybe it would be better considering Windows CE systems too:
> > >
> > > - if os.name == 'nt'
> > > + if os.name in ('nt', 'ce')
> > >
> > Cygwin? I don't know how Unix-like it is.
>
> Yeah, that's a fair point, it's the behaviour of the
> underlying Winsock API
On Wed, Apr 30, 2008 at 9:36 AM, Farshid Lashkari <[EMAIL PROTECTED]> wrote:
> I was just curious as to why cStringIO objects don't implement the
> buffer interface. cStringIO objects seem similar to string and array
> objects, and those support the buffer protocol. Is there a reason
> against
Hello,
I'm not sure if this is the right place to ask, so I apologize ahead
of time if it is.
I was just curious as to why cStringIO objects don't implement the
buffer interface. cStringIO objects seem similar to string and array
objects, and those support the buffer protocol. Is there a reason
Hi all,
I've been working on optimization of the AST, including the porting of
the old bytecode-level optimizations to the AST level. A few questions
have come up in the process of doing this, all of which are probably
appropriate for discussion on this list. The code I'm referring to here
ca
26 matches
Mail list logo