to
the arguments. In Python it can only mean assigning
directly to the bare name -- anything else isn't
changing the argument itself, but something else to
which the argument refers.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
clearly indicate its existence.
Likewise, there are plenty of experiments that you can
perform with any Python interpreter that reveal the
existence of references, or something equivalent to them.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
scope. If it's changed in the inner scope, a new entry is
added there.
That sounds like a kind of copy-on-write. It's certainly not
call-by-value by any sane interpretation (contrary to your
assertion that all calling is call-by-value).
--
Greg
--
http://mail.python.org/mailman/listinfo/python
equivalent of the strategy used
in C to emulate call-by-reference -- and it's needed for
the same reason, i.e. the language itself only provides
call-by-value. So you pass a value that you can manually
dereference to get the same effect.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
PyFile object, since there
simply isn't one to be had.
There is an exception to that -- if the object is one that
has a file descriptor underlying it somewhere (such as a
pipe or socket) you could get that and wrap it using fdopen().
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
BJörn Lindqvist wrote:
standard implementation completely based on WfMC specifications using
XPDL (without any proprietary extensions !)
Ah, it's based on WtfMC. That explains everything. :-)
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
of
call-by-value needs to describe it in a more general
way.
Refusing to accept that a more general definition
exists just because it's not mentioned in your Pascal
book is a little absurd.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
, for something that
has an analogy, if not an exact equivalent, in other languages,
why can't we do the same for reference and call by value?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
to the same object.
The difference is *entirely* due to the difference in the semantics
of assignment between the two languages. Once you've taken that
into account, there is no need to look for difference in the
parameter passing scheme.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
, or some registration
process I can use, to get instances of my class automatically
wrapped and unwrapped?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
call-by-value in Python and Pascal is
exactly the same difference as there is between assignment
in Python and Pascal. Why should we throw out one term but
not the other?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
is passed to a
function.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
.
Yes, and so is passing by value!
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
just occurred to me. If you take the
view that the value of an expression is an object,
then the terms value and object are synonymous.
So if you then insist that Python uses call by object,
you're actually saying it uses call by value!
--
Greg
--
http://mail.python.org/mailman/listinfo/python
that
don't have anything to do with parameter passing!
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
and references.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
).
Since Python only has one parameter passing mechanism,
there's no need to give it a name at all. If you're
having to explain it, just explain it, and don't
bother naming it!
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
*, not some other language
you happen to know previously.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
, that tells them all
they need to know.
Nonsense.
Why? What else *do* you think they need to know?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
about it, we don't need it!
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Douglas Alan wrote:
greg [EMAIL PROTECTED] writes:
This holds for *all* languages that I know about, both
static and dynamic.
Then you don't know about all that many languages. There are
languages that use call-by-name, and those that use
call-by-value-return. Some use call-by-need
is somewhat unfortunate.
If they'd been called something like call by assignment
and call by alias, none of this confusion would have
arisen.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
of
their regular employment temporarily, so unless there's
quite a *lot* of money being offered (enough to offer someone
full-time employment, for example) it doesn't necessarily
make any more man-hours available.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
if it doesn't
support indexing or iterating or whatever you want to
do with it.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
in some way. So instead, you just
tell them how it works, and leave them to decide for themselves
what name they want to give it.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
We have had requests to extend the deadline for submitting Tutorial
Proposals for PyCon 2009 (US) through the weekend and are willing to do so.
We will accept tutorial proposals through Monday, November 3.
--greg
==
The period for submitting tutorial proposals
Douglas Alan wrote:
greg [EMAIL PROTECTED] writes:
Seems to me that (1) describes exactly how parameter passing
works in Python. So why insist that it's *not* call by value?
Because there's an important distinction to be made,
The distinction isn't about parameter passing, though, it's
Gabriel Genellina wrote:
En Tue, 28 Oct 2008 00:58:10 -0200, greg [EMAIL PROTECTED]
escribió:
(1) Call by value: The actual parameter is an expression. It is
evaluated and the result is assigned to the formal parameter.
Subsequent assignments to the formal parameter do not affect
assignment works in Python, that
tells them all they need to know.
If they don't understand how assignment works, then they
have a more fundamental knowledge gap that needs to be
corrected first.
--
Greg
Then the questions and puzzled looks will start...
And when they tell their friend that Joe
in early December to give you time to
prepare your class and PyCon will compensate instructors US$1,500 per
tutorial.
If you have any questions, please contact [EMAIL PROTECTED]
Greg Lindstrom
Tutorial Coordinator, PyCon 2009 (US)
--
http://mail.python.org/mailman/listinfo/python-list
a wild guess as 50%.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
, other.value)
Unfortunately, the __cmp__ method has been eliminated from
3.0 as well, so this won't work as-is. You would need to
override __lt__, __eq__, etc.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
an alias for the actual parameter,
so that assigning to the formal parameter has the same
effect as assigning to the actual parameter.
Seems to me that (1) describes exactly how parameter passing
works in Python. So why insist that it's *not* call by value?
--
Greg
--
http://mail.python.org
to create its
own versions of all the builtin constants and type objects,
and import its own copy of all the modules it uses.
One wonders if it wouldn't be cheaper just to fork the
process. Shared memory can be used to transfer large lumps
of data if needed.
--
Greg
--
http://mail.python.org/mailman
a separate thread for
each interpreter, which you mightn't always want.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
dump
the big lump of data to be transferred in there, and send
a short message through a pipe to the other process to
let it know it's there.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
in there? It becomes visible to other
threads using the same type object. If it's not safe
for sharing, bad things happen.
Python's data model is not conducive to making a clear
distinction between private and shared objects,
except at the level of an entire interpreter.
--
Greg
--
http://mail.python.org/mailman
, are shared as well.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
that the attribute wasn't found. So when
your property raises an AttributeError, this is
indistinguishable from the case where the property wasn't
there at all.
To avoid this you would have to raise some exception
that doesn't derive from AttributeError.
--
Greg
--
http://mail.python.org/mailman
and shouldn't be done in multi-
threaded apps
No, it's there because it's necessary for acceptable performance
when multiple threads are running in one interpreter. Independent
interpreters wouldn't mean the absence of a GIL; it would only
mean each interpreter having its own GIL.
--
Greg
--
http
pointers around everywhere is bound to have some effect
on performance. The idea mightn't go down too well if it
slows things significantly in the case where you're only
using one interpreter.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
James Mills wrote:
Directly importing a bash function into python is not
possible.
Well, you could write a bash interpreter in Python...
but that's probably more work than it's worth
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
into arguments, it's
the program being run. So you need to avoid any kind of
exec or spawn operation, whether it goes through the shell
or not, unless you know the program being run isn't going
to interpret '/' as an option.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
. The main problem is that its nature
needs to be much more clearly spelled out in the
docs -- it's something of an attractive nuisance the
way it is.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
fast,
but good for a lot of every day tasks.
The neat thing about Python is that you can strap
on a jet engine (C extension) when you really need
a burst of speed.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
error when running in iPython, but I can hit the LDAP server
using PHP.
Do I need to run a bind statement of some sort after initialize()?
Thanks,
--greg
--
http://mail.python.org/mailman/listinfo/python-list
for an
event to get scheduled while in the midst of a sleep. It
also doesn't take any measures to protect its data structures
from concurrent access.
The documentation could make this clearer, especially since
it confusingly talks about allowing other threads to run.
--
Greg
--
http://mail.python.org
.
Anyway, glad you're finding it useful. Feel free to ask if
you have any more questions.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
will compensate instructors US$1,500 per
tutorial.
If you have any questions, please contact [EMAIL PROTECTED]
Greg Lindstrom
Tutorial Coordinator, PyCon 2009 (US)
--
http://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http
will compensate instructors US$1,500 per
tutorial.
If you have any questions, please contact [EMAIL PROTECTED]
Greg Lindstrom
Tutorial Coordinator, PyCon 2009 (US)
--
http://mail.python.org/mailman/listinfo/python-list
, either it's sufficient to just
resize one pane and keep the others a fixed size, or
you really want user control over the size of each
pane individually. Proportional resizing is a
compromise that just ends up annoying me.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Humerus 2.0 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/Humerus-2.0.0.tar.gz
Online documentation:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/Humerus-2.0.0/doc/
This version of Humerus has been extensively revised from the previous one.
James Mills wrote:
I've just checked out the darcs repository and converted
it to Mercurial. I'm going to have a bit of a play wiht it...
Anyone interested in this ?
I'll be interested to hear of any developments.
--
http://mail.python.org/mailman/listinfo/python-list
functions.
Although Guido has defended it on the grounds that it can
be inconvenient having a function that returns different
types under different circumstances. Also it discourages
making the mistake of treating the return value as a
boolean.
--
Greg
--
http://mail.python.org/mailman/listinfo
ALBOW - A Little Bit of Widgetry for PyGame
Version 2.0 is now available.
This version incorporates substantial additions and improvements.
New widgets include TabPanel, TableView, CheckBox, RadioButton and
an enhanced set of TextField-based controls.
ALBOW - A Little Bit of Widgetry for PyGame
Version 2.0 is now available.
This version incorporates substantial additions and improvements.
New widgets include TabPanel, TableView, CheckBox, RadioButton and
an enhanced set of TextField-based controls.
Marc 'BlackJack' Rintsch wrote:
On Fri, 03 Oct 2008 19:10:27 +1200, greg wrote:
(BTW, try doing that with the x.len() notation!)
def size(obj):
return obj.len()
or
size = operator.methodcaller('len')
No, what I meant was that if the normal way of getting
the len of something were
after I've changed
something.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
it has anything to do with
recursion.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Greg Hazel [EMAIL PROTECTED] added the comment:
There seem to be some other exception type and string inconsistencies,
but they are not new to Python 2.6
tb.tb_frame = None
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: 'traceback' object has only read-only
it with the following.
Then you're effectively distributing the modified source in
its entirety, just with a funny header at the top of each
source file that serves no useful purpose.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
be
rather hackish, and wouldn't do anything for any
other incomparable types that might come along.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
the elements
involved are transitive, and leave the semantics in other
cases undefined.
Then in the Decimal module it could be warned that the
equality relations between int-float and int-Decimal are
not transitive, perhaps noting that this can cause
problems with sets and dicts.
--
Greg
--
http
:-)
(BTW, try doing that with the x.len() notation!)
--
Greg
But it's too late to change things.
--
http://mail.python.org/mailman/listinfo/python-list
Aaron Castironpi Brady wrote:
How do you have a yellow dog,
It's not a yellow dog, it's a dog yellow. Attention pay! :-)
--
Ewing Gregory
--
http://mail.python.org/mailman/listinfo/python-list
, they don't have any defined
relationship to source files, so they don't help you
find which file something is defined in.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
is that there are *no* side effects.
The confusing thing is that in everyday English the term
implies something bad or unwanted (e.g. side effects of
a drug). That's not necessarily true of the technical
meaning -- often the side effect is exactly what we want,
as in the case of append.
--
Greg
--
http
is regarded as a feature, so anything
which changes that seems to be a non-starter.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
own nest).
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
New submission from Greg Hazel [EMAIL PROTECTED]:
Unrelated to this bug, I would like to have the ability to remove the
reference to the frame from the traceback object. Specifically so that
the traceback object could be stored for a while without keeping all
the locals alive as well.
So
know, whether something is deemed a derivative work is
judged on the basis of how similar it is to another work,
not whether its author had knowledge of the other work.
As long as you express an idea in an original way, it
shouldn't matter where you got the idea from.
--
Greg
--
http
will compensate instructors US$1,500 per
tutorial.
If you have any questions, please contact [EMAIL PROTECTED]
Greg Lindstrom
Tutorial Coordinator, PyCon 2009 (US)
--
http://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http
will compensate instructors US$1,500 per
tutorial.
If you have any questions, please contact [EMAIL PROTECTED]
Greg Lindstrom
Tutorial Coordinator, PyCon 2009 (US)
--
http://mail.python.org/mailman/listinfo/python-list
Greg Couch [EMAIL PROTECTED] added the comment:
We're having the same problem. My quick fix was to patch subprocess.py
so the command line and executable are converted to the filesystem
encoding (mbcs).
--
nosy: +gregcouch
Added file: http://bugs.python.org/file11674/Python-2.5.2
want to start iterating
again.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
.
This is a *FREE* event (we have GREAT sponsors), so all you need to bring is
yourself. We have over 45 people -- from 4 States -- registered and tons of
great swag and giveaways lined up.
See our wiki (http://pycamp.python.org/Arkansas/HomePage) for more details
and registration info.
Greg Lindstrom
Python
.
This is a *FREE* event (we have GREAT sponsors), so all you need to bring is
yourself. We have over 45 people -- from 4 States -- registered and tons of
great swag and giveaways lined up.
See our wiki (http://pycamp.python.org/Arkansas/HomePage) for more details
and registration info.
Greg Lindstrom
Python
to give you time to
prepare your class.
PyCon will compensate instructors US$1,500 per tutorial.
If you have any questions, please contact [EMAIL PROTECTED]
Greg Lindstrom
Tutorial Coordinator, PyCon 2009
--
http://mail.python.org/mailman/listinfo/python-announce-list
Support the Python
to give you time to
prepare your class.
PyCon will compensate instructors US$1,500 per tutorial.
If you have any questions, please contact [EMAIL PROTECTED]
Greg Lindstrom
Tutorial Coordinator, PyCon 2009
--
http://mail.python.org/mailman/listinfo/python-list
)
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
New submission from Greg Darke [EMAIL PROTECTED]:
When the unparse demo is run on a file containing a 'from x import y'
statement, it incorrectly outputs it as 'from x import , y'.
The attached patch fixes this.
--
components: Demos and Tools
files: fix_import_from_bug.patch
keywords
Arnaud Delobelle wrote:
Or:
import ModuleName as this_module
Or:
this_module = __import__(__name__)
then you don't have to change anything.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Microsoft Excel and creates
reports for work, but would like to create an Open Source version using Open
Office and release it to the community (and maybe get a talk at PyCon :-).
Is there someone here who can help me out, or is there an appropriate
mailing list for me to join?
Thanks
--greg
--
http
reluctant to forge ahead with
too many new features until a native Windows version
exists.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
to limitations of physical space we must close registration at 100
participants (in honor of my first OS, SunOS, we may go to 110). Check out
our wiki at http://pycamp.python.org/Arkansas/HomePage. There's no
registration fee, so if you're in the area stop on by...we are looking
forward to a great day.
Greg
to limitations of physical space we must close registration at 100
participants (in honor of my first OS, SunOS, we may go to 110). Check out
our wiki at http://pycamp.python.org/Arkansas/HomePage. There's no
registration fee, so if you're in the area stop on by...we are looking
forward to a great day.
Greg
Pyrex 0.9.8.5 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
Various minor bug fixes and improvements.
What is Pyrex?
--
Pyrex is a language for writing Python extension modules.
It lets you freely mix operations on Python and C data, with
all
keep
me from having to write this. I've looked at Jasper and DataVision;
Thanks,
--greg
--
http://mail.python.org/mailman/listinfo/python-list
The Arkansas Python Users Group announces a 1-day Python conference to be
held on the campus of the University of Central Arkansas (www.uca.edu) on
October 4. We plan a 3-hour Introduction to Python class as well as talks
on text/file processing, Python standard library, Django, pyGame, OLPC and
be to crawl the site and
build your own index based on the information you're
interested in.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Avinash Vora wrote:
(Greg: You only sent the email to me: you probably wanted to add the
mailing list to the recipients.)
I replied to the newsgroup as well, so it should
turn up in the list.
Right, but I meant if there is an Apple-sanctioned way. I guess not?
Not that I'm aware of.
I
.
Apart from the initial installation of Python itself, I
never use an installer to install a Python package if I
can avoid it. I wouldn't trust it to install into the right
Python version.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
on
it)
I've very rarely had any problem with maintaining my
own Python installation, but as I said, I always install
packages using python setup.py.
Python itself copes very well with having multiple
versions installed, on all platforms, but you have to
do things the Python way.
--
Greg
--
http
.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch wrote:
Paul Rubin wrote:
use contextlib.nexted().
You mean contextlib.nested I guess.
Although nexted is an intriguing-sounding word. I wonder
what it could mean?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
New submission from Greg Hazel [EMAIL PROTECTED]:
exec()ing a line which causes a DeprecationWarning causes the warning
to quote the file exec() occurs in instead of the string.
Demonstration of the issue:
http://codepad.org/aMTYQgN5
--
components: None
messages: 70129
nosy: ghazel
I am able to use the PIL module to capture a screen or specific
window. My problem is when capturing a window (on windows XP) I can
only capture the visible portion of the window. Is there any way to
capture the entire window? specifically the scrolled portion of a
window that is not visible on
Pyrex 0.9.8.4 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
This version fixes a bug introduced by the last change
to unsigned integer indexing.
What is Pyrex?
--
Pyrex is a language for writing Python extension modules.
It lets you freely mix
Pyrex 0.9.8.4 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
This version fixes a bug introduced by the last change
to unsigned integer indexing.
What is Pyrex?
--
Pyrex is a language for writing Python extension modules.
It lets you freely mix
Pyrex 0.9.8.3 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
Compiling multiple .pyx files in one go works properly now, and
can be substantially faster if you have a lot of modules that
cimport from each other. I had to rearrange various things to
make this work,
901 - 1000 of 1560 matches
Mail list logo