On Sat, Nov 10, 2018 at 3:19 PM Steven D'Aprano wrote:
>
> On Sat, Nov 10, 2018 at 12:56:07PM +1100, Chris Angelico wrote:
>
> > Not ambiguous. It takes as many valid octal digits as it can.
>
> What is the rationale for that? Hex escapes don't.
Irrelevant to whether it's ambiguous or not.
> > "
On Sat, Nov 10, 2018 at 12:56:07PM +1100, Chris Angelico wrote:
> Not ambiguous. It takes as many valid octal digits as it can.
What is the rationale for that? Hex escapes don't.
My guess is, "Because that's what C does". And C probably does it
because "Dennis Ritchie wanted to minimize the num
On Fri, 9 Nov 2018 at 23:56, Chris Angelico wrote:
> >>> list("\797")
> ['\x07', '9', '7']
> The octal escape grabs as many digits as it can, and when it finds a
> character in the literal that isn't a valid octal digit (same whether
> it's a '9' or a 'q'), it stops. The remaining characters have
On Sat, Nov 10, 2018 at 12:42 PM Joao S. O. Bueno wrote:
>
> I just saw some document which reminded me that strings with a
> backslash followed by 3 octal digits. When a backslash is followed by
> 3 octal digits, that means a character with the corresponding
> codepoint and all is well.
>
> The "
I just saw some document which reminded me that strings with a
backslash followed by 3 octal digits. When a backslash is followed by
3 octal digits, that means a character with the corresponding
codepoint and all is well.
The "valid scenaario":
In [42]: "\777"
Out[42]: 'ǿ'
The problem is when yo
you are right on the lines you mentioned. Those are all working if i run it
as a module which i do every time.
This is somewhat unpleasant to me, especially while developing something
and trying to test it quickly.
I just want to be able to use same relative imports and run single file
with `python
I think this about the limitation to . and .. possibly?
>
> Message: 6
> Date: Sat, 10 Nov 2018 11:00:16 +1100
> From: Chris Angelico
> To: python-ideas
> Subject: Re: [Python-ideas] Relative Imports
> Message-ID:
> <
> captjjmrtapaxib4wm6feh-xkpu_cf5rnx2tr0vzcaggxppg...@mail.gmail.com>
On Fri, Nov 09, 2018 at 03:51:46PM -0800, danish bluecheese wrote:
> └── src
> ├── __init__.py
> ├── main.py
> └── test
> ├── __init__.py
> └── test_main.py
>
> assume the structure above. To be able to use relative imports with such
> fundamental structure either i can
On Sat, Nov 10, 2018 at 10:52 AM danish bluecheese
wrote:
>
> └── src
> ├── __init__.py
> ├── main.py
> └── test
> ├── __init__.py
> └── test_main.py
>
> assume the structure above. To be able to use relative imports with such
> fundamental structure either i can go fo
└── src
├── __init__.py
├── main.py
└── test
├── __init__.py
└── test_main.py
assume the structure above. To be able to use relative imports with such
fundamental structure either i can go for sys.path hacks or could run as a
module from one further level parent.
I do n
On Fri, Nov 09, 2018 at 03:20:52PM -0800, danish bluecheese wrote:
> It supports, but whenever you get multiple folders there is no clean
> solution.
What do you mean?
--
Steve
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.
It supports, but whenever you get multiple folders there is no clean
solution.
Either there are some sys.path hacks or running things as modules in some
cases.
These are not pleasant at all.
I think we can come up with something better.
Interested in?
On Fri, Nov 9, 2018 at 3:17 PM Steven D'Aprano
On Fri, Nov 09, 2018 at 02:54:50PM -0800, danish bluecheese wrote:
> Im tired of not being able to make relative imports freely.
Python has supported relative imports for a while now.
https://docs.python.org/3/tutorial/modules.html#intra-package-references
What do you mean?
--
Steve
__
Hi all,
Im tired of not being able to make relative imports freely. Now trying to
develop a module which enable any project to use relative imports once it
is loaded. Anybody interested in?
Best,
___
Python-ideas mailing list
Python-ideas@python.org
htt
14 matches
Mail list logo