Hi Chris,
In other words, you change the *public interface* of your functions
> all the time? How do you not have massive breakage all the time?
I suppose that Pycharm helps the most with its refactoring tools. We use
type annotations, contracts, static checks (mypy, pylint, pydocstyle) and
Hi,
I'd like to share a use pattern for contracts that might have got lost in
the discussion and which I personally grow to like more and more. I'm not
making any claims; this use pattern work for our team and I can't judge how
much of a benefit it would be to others.
Imagine there are two
Hi,
I don't know if this was already debated but I don't know how to search
in the whole archive of the list.
For now the adoption of pyproject.toml file is more difficult because
toml is not in the standard library.
Each tool which wants to use pyproject.toml has to add a toml lib as a
On Mon, Oct 8, 2018 at 2:55 AM, Steven D'Aprano wrote:
>
> On Mon, Oct 08, 2018 at 09:10:40AM +0200, Jimmy Girardet wrote:
>> Each tool which wants to use pyproject.toml has to add a toml lib as a
>> conditional or hard dependency.
>>
>> Since toml is now the standard configuration file format,
On Mon, Oct 08, 2018 at 04:29:34PM +1100, Chris Angelico wrote:
> On Mon, Oct 8, 2018 at 4:26 PM Marko Ristin-Kaufmann
> wrote:
> >> Not true for good docstrings. We very seldom change the essential
> >> meaning of public functions.
> >
> > In my team, we have a stale docstring once every two
I'm not an expert on memory. I used Process Explorer to look at the
Process. The Working Set of the current run is 11GB. The Private Bytes is
708MB. Actually, see all the info here:
https://www.dropbox.com/s/tzoud028pzdkfi7/screenshot_TURING_2018-10-08_133355.jpg?dl=0
I've got 16GB of RAM on this
Hi Jimmy, and welcome,
On Mon, Oct 08, 2018 at 09:10:40AM +0200, Jimmy Girardet wrote:
> Hi,
>
> I don't know if this was already debated but I don't know how to search
> in the whole archive of the list.
>
>
> For now the adoption of pyproject.toml file is more difficult because
> toml is
That's incredibly interesting. I've never used mmap before.
However, there's a problem.
I did a few experiments with mmap now, this is the latest:
path = pathlib.Path(r'P:\huge_file')
with path.open('r') as file:
mmap = mmap.mmap(file.fileno(), 0, access=mmap.ACCESS_READ)
for match in
On Mon, Oct 8, 2018 at 9:26 PM Steven D'Aprano wrote:
> > In other words, you change the *public interface* of your functions
> > all the time? How do you not have massive breakage all the time?
>
> I can't comment about Marko's actual use-case, but *in general*
> contracts are aimed at
On 08Oct2018 10:56, Ram Rachum wrote:
That's incredibly interesting. I've never used mmap before.
However, there's a problem.
I did a few experiments with mmap now, this is the latest:
path = pathlib.Path(r'P:\huge_file')
with path.open('r') as file:
mmap = mmap.mmap(file.fileno(), 0,
On Mon, Oct 8, 2018 at 12:23 PM Nathaniel Smith wrote:
>
> On Mon, Oct 8, 2018 at 2:55 AM, Steven D'Aprano wrote:
> >
> > On Mon, Oct 08, 2018 at 09:10:40AM +0200, Jimmy Girardet wrote:
> >> Each tool which wants to use pyproject.toml has to add a toml lib as a
> >> conditional or hard
Hi Crhis,
> In other words, you change the *public interface* of your functions
> > all the time? How do you not have massive breakage all the time?
>
> I can't comment about Marko's actual use-case, but *in general*
> contracts are aimed at application *internal* interfaces, not so much
>
>> However, another possibility is the the regexp is consuming lots of memory.
>>
>> The regexp seems simple enough (b'.'), so I doubt it is leaking memory like
>> mad; I'm guessing you're just seeing the OS page in as much of the file as it
>> can.
>
> Yup. Windows will aggressively fill up
" Windows will aggressively fill up your RAM in cases like this because
after all why not? There's no use to having memory just sitting around
unused."
Two questions:
1. Is the "why not" sarcastic, as in you're agreeing it's a waste?
2. Will this be different on Linux? Which command do I run on
>> He's referring to PEPs 518 and 517 [1], which indeed standardize on
>> TOML as a file format for Python package build metadata.
>>
>> I think moving anything into the stdlib would be premature though –
>> TOML libraries are under active development, and the general trend in
>> the packaging
On Mon, Oct 8, 2018 at 12:20 PM Cameron Simpson wrote:
>
> On 08Oct2018 10:56, Ram Rachum wrote:
> >That's incredibly interesting. I've never used mmap before.
> >However, there's a problem.
> >I did a few experiments with mmap now, this is the latest:
> >
> >path = pathlib.Path(r'P:\huge_file')
On Mon, Oct 08, 2018 at 09:32:23PM +1100, Chris Angelico wrote:
> On Mon, Oct 8, 2018 at 9:26 PM Steven D'Aprano wrote:
> > > In other words, you change the *public interface* of your functions
> > > all the time? How do you not have massive breakage all the time?
> >
> > I can't comment about
Thanks for your help everybody! I'm very happy to have learned about mmap.
On Mon, Oct 8, 2018 at 3:27 PM Richard Damon
wrote:
> On 10/8/18 8:11 AM, Ram Rachum wrote:
> > " Windows will aggressively fill up your RAM in cases like this
> > because after all why not? There's no use to having
On 04/10/18 19:10, Jonathan Fine wrote:
In response to my problem-solution pair (fixing a typo)
TITLE: Debug print() statements cause doctests to fail
Rhodri James wrote:
Or write your debug output to stderr?
Perhaps I've been too concise. If so, I apologise. My proposal is that
the system
On 10/8/18 8:11 AM, Ram Rachum wrote:
> " Windows will aggressively fill up your RAM in cases like this
> because after all why not? There's no use to having memory just
> sitting around unused."
>
> Two questions:
>
> 1. Is the "why not" sarcastic, as in you're agreeing it's a waste?
> 2. Will
I agree here. I briefly urged against using the less used TOML format, but
I have no real skin in the game around packaging. I like YAML, but that's
also not in the standard library, even if more widely used.
But given that packaging is committed to TOML, I think that's a strong case
for
On Mon, Oct 8, 2018 at 12:49 PM Jimmy Girardet wrote:
>
> Hi,
Hi Jimmy and welcome! :)
>
> I don't know if this was already debated but I don't know how to search
> in the whole archive of the list.
>
>
> For now the adoption of pyproject.toml file is more difficult because
> toml is not in
On Mon, Oct 8, 2018 at 4:53 AM Erik Bray wrote:
> If I had the energy to argue it I would also argue against using TOML
> in those PEPs. I personally don't especially care for TOML and what's
> "obvious" to Tom is not at all obvious to me. I'd rather just stick
> with YAML or perhaps something
On Mon, Oct 8, 2018 at 11:11 PM Steven D'Aprano wrote:
>
> On Mon, Oct 08, 2018 at 09:32:23PM +1100, Chris Angelico wrote:
> > On Mon, Oct 8, 2018 at 9:26 PM Steven D'Aprano wrote:
> > > > In other words, you change the *public interface* of your functions
> > > > all the time? How do you not
On Sun, Oct 07, 2018 at 04:24:58PM -0400, Terry Reedy wrote:
> A mathematical function is defined or specified by a input domain,
> output range, and a mapping from inputs to outputs. The mapping can be
> defined either by an explicit listing of input-output pairs or by a rule
> specifying
On 10/08/2018 12:29 AM, Terry Reedy wrote:
On 10/3/2018 4:29 PM, Marcus Harnisch wrote:
When trying to import lzma on one of my machines, I was suprised to
get a normal import error like for any other module.
What was the traceback and message? Did you get an import error for
one of the
Hello,
Since __fspath__ was introduced in PEP 519 it is possible to create
object classes that are representing file system paths.
But there is no corresponding type object in the "typing" module. Thus I
cannot specify functions, that accept any kind of object which supports
the __fspath__
In typeshed there is os.PathLike which is close. You should be able to use
Union[str, os.PathLike[str]] for what you want (or define an alias).
We generally don't want to add more things to typing that aren't closely
related to the type system. (Adding the io and re classes was already less
than
On Mon, Oct 8, 2018 at 11:15 PM Anders Hovmöller wrote:
>
>
> However, another possibility is the the regexp is consuming lots of memory.
>
> The regexp seems simple enough (b'.'), so I doubt it is leaking memory like
> mad; I'm guessing you're just seeing the OS page in as much of the file as it
Hi Chris,
I hope you don't mind me responding though you would like to stop
participating. This message is meant for other readers in case they are
interested.
> Alice tests her package A with some test data D_A. Now assume Betty did
> not write any contracts for her package B. When Alice tests
On Tue, Oct 09, 2018 at 01:21:57AM +1100, Chris Angelico wrote:
> > > Yet we keep having use-cases shown to us involving one person with one
> > > module, and another person with another module, and the interaction
> > > between the two.
> >
> > Do we? I haven't noticed anything that matches that
On 10/8/2018 10:26 AM, Steven D'Aprano wrote:
On Sun, Oct 07, 2018 at 04:24:58PM -0400, Terry Reedy wrote:
https://www.win.tue.nl/~wstomv/edu/2ip30/references/design-by-contract/index.html
defines contracts as "precise (legally unambiguous) specifications" (5.2
Business
> Summary: Python's timeit.timeit() has an undocumented feature /
> implementation detail that gives much of what the original poster has
> asked for. Perhaps revising the docs will solve the problem.
although timeit can be used with a callable, you need to create a lambda
expression if the
33 matches
Mail list logo