Chris -
In the Python 2.7.10 documentation, I am referring to section 5. Built-in
Types, subsection 5.9 File Objects.
In that subsection, I have the following paragraph:
file.read([*size*])
Read at most *size* bytes from the file (less if the read hits EOF before
obtaining *size* bytes). If the
On Wed, 11 Jan 2023 at 21:31, Stephen Tucker wrote:
>
> Chris -
>
> In the Python 2.7.10 documentation, I am referring to section 5. Built-in
> Types, subsection 5.9 File Objects.
>
> In that subsection, I have the following paragraph:
>
> file.read([size])
>
> Read at most size bytes from the fi
Yes, I did understand that. In your example, "a" and "b" are the same pointer,
so an operation on one is an operation on the other (because they’re the same
memory block). My issue in Python came up because Python can dynamically
change one or the other to a different object (memory block) so
Op 11/01/2023 om 16:33 schreef Jen Kris via Python-list:
Yes, I did understand that. In your example, "a" and "b" are the same pointer,
so an operation on one is an operation on the other (because they’re the same memory block).
Sorry if you feel I'm being overly pedantic, but your explanatio
Chris,
Thanks for your reply.
I hope the evidence below (taken from IDLE) clarifies my issue:
Stephen.
==
1. Create BOM.txt
-
>>> myfil = open ("BOM.txt", "wb")
>>> myfil.write ("\xef" + "\xbb" + "\xbf")
>>> myfil.close()
2. Input three bytes at once from
On Thu, 12 Jan 2023 at 04:31, Stephen Tucker wrote:
> 1. Create BOM.txt
> 2. Input three bytes at once from BOM.txt and print them
> 3. Input three bytes one at a time from BOM.txt and print them
All of these correctly show that a file, in binary mode, reads and writes bytes.
> 4. Input three by
Chris Angelico schreef op 11/01/2023 om 18:36:
On Thu, 12 Jan 2023 at 04:31, Stephen Tucker wrote:
> 1. Create BOM.txt
> 2. Input three bytes at once from BOM.txt and print them
> 3. Input three bytes one at a time from BOM.txt and print them
All of these correctly show that a file, in binary m
Cameron Simpson wrote:
> On 10Jan2023 08:45, Chris Green wrote:
> >dn wrote:
> >> See also the wisdom of enabling comp.lang.python and python-list as
> >> 'mirrors', enabling those who prefer one mechanism/client to another,
> >> yet maintaining a single 'community'.
> >>
> >Yes, this is importa
Cameron Simpson wrote at 2023-1-11 08:37 +1100:
> ...
>There's a Discourse forum over at discuss.python.org. I use it in
>"mailing list mode" and do almost all my interactions via email, exactly
>as I do for python-list. Posts come to me and land in the same local
>mail folder I use for python-list
aapost wrote at 2023-1-10 22:15 -0500:
>On 1/4/23 12:13, aapost wrote:
>> On 1/4/23 09:42, Dieter Maurer wrote:
>> ...
>>> You might have a look at `PyXB`, too.
>>> It tries hard to enforce schema restrictions in Python code.
>> ...
>Unfortunately picking it apart for a while and diving deeper in t
Thanks for your comments. After all, I asked for clarity so it’s not pedantic
to be precise, and you’re helping to clarify.
Going back to my original post,
mx1 = [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ]
arr1 = mx1[2]
Now if I write "arr1[1] += 5" then both arr1 and mx1[2][1] will be changed
I think the key point is that "the operation" doesn't act on "names" but
on "objects" (which are different sort of things), and thus there isn't
an "the other" when talking about the object being operated on.
Thinking of an operation being on a "name" is the mental model error.
The only operat
On Tue, 10 Jan 2023 16:59:59 -0500, Thomas Passin
declaimed the following:
>Just to add a possibly picky detail to what others have said, Python
>does not have an "array" type. It has a "list" type, as well as some
>other, not necessarily mutable, sequence types.
>
However, it has long
On 2023-01-11 18:49:14 +, Stefan Ram wrote:
> Jen Kris writes:
> >Each name has the same pointer
>
> ... from the C programmer's point of view.
>
> From the Python programmer's point of view, there are no "pointers".
That's just window dressing. Pointers are evil, so we can't have
point
On 11Jan2023 19:10, Dieter Maurer wrote:
Cameron Simpson wrote at 2023-1-11 08:37 +1100:
...
There's a Discourse forum over at discuss.python.org. I use it in
"mailing list mode" and do almost all my interactions via email, exactly
as I do for python-list. [...]
I am also using the Plone `Dis
15 matches
Mail list logo