Been doing some LDAP stuff lately, and I came across the
“migrationtools” package <https://gitlab.com/future-ad-laboratory/migrationtools> for
converting the contents of /etc/passwd and family to LDAP records.
This is a bunch of Perl code, full of lines like these:
if ($shell) {
print $HANDLE "loginShell: $shell\n";
}
if ($uid ne "") {
print $HANDLE "uidNumber: $uid\n";
} else {
print $HANDLE "uidNumber:\n";
}
if ($gid ne "") {
print $HANDLE "gidNumber: $gid\n";
} else {
print $HANDLE "gidNumber:\n";
}
if ($homedir) {
print $HANDLE "homeDirectory: $homedir\n";
} else {
print $HANDLE "homeDirectory:\n";
}
Perl is supposed to be famous, even notorious, for the conciseness of
its code, but I think whoever created this originally didn’t get that
memo.
I created an alternative tool
<https://bitbucket.org/ldo17/passwd_to_ldap>, focusing just on the
passwd, shadow and group files, and leaving out the macOS
compatibility. My code for writing out a single LDIF record is
basically this:
write_attr \
(
out,
"dn",
"%s=%s,%s" % (table.dn_field, escape_dn(entry[table.keyfield]), tabledn)
)
for objclass in table.object_classes :
write_attr(out, "objectClass", objclass)
#end for
write_attr(out, "objectClass", "top")
for field, key in table.ldap_mapping :
if key in entry :
value = entry[key]
if isinstance(value, (list, tuple)) :
for item in value :
write_attr(out, field, item)
#end for
else :
write_attr(out, field, value)
#end if
#end if
#end for
out.write("\n")
If you total the sizes of migrate_passwd.pl and migrate_group.pl, you
get 496 lines (not including migrate_common.ph). My entire script
is just 341 lines.
Of course, what I didn’t show you above is the table of rules that
drives that common LDIF-writing code, to steer the different
processing of the different files and their fields. But that complete
table is just 63 lines.
This is quite common with table-driven aka data-driven programming:
you might think that factoring out common code into a more generic
form, with the different cases defined in a data structure, just moves
the complexity from one place to another, but in fact it is usually
the case that you end up with less code overall.
Frankly, Python is just generally 'better' these days.
Maybe not AS 'concise' but more 'readable' AND easier
to understand six months from now. The speed is now
'adequate' and Python-4 is supposed to be even faster.
c186282 <c186282@nnada.net> writes:
[...]
Frankly, Python is just generally 'better' these days.
Maybe not AS 'concise' but more 'readable' AND easier
to understand six months from now. The speed is now
'adequate' and Python-4 is supposed to be even faster.
Where are you getting your information? There are no plans for
Python 4.
On 6/14/25 5:25 AM, Keith Thompson wrote:
c186282 <c186282@nnada.net> writes:
[...]
Frankly, Python is just generally 'better' these days.Where are you getting your information? There are no plans for
Maybe not AS 'concise' but more 'readable' AND easier
to understand six months from now. The speed is now
'adequate' and Python-4 is supposed to be even faster.
Python 4.
Nonsense ... search on it.
The PLAN is far fewer diffs than between P2 and P3,
just more optimization.
I'd say expect early releases within a year.
c186282 <c186282@nnada.net> writes:
On 6/14/25 5:25 AM, Keith Thompson wrote:[...]
c186282 <c186282@nnada.net> writes:
[...]
Where are you getting your information? There are no plans for
Python 4.
Nonsense ... search on it.
I did.
The PLAN is far fewer diffs than between P2 and P3,
just more optimization.
I'd say expect early releases within a year.
What is the basis for that claim?
Maybe you're right. If so, you shouldn't have any difficulty citing a credible source.
[...]
On Sat, 14 Jun 2025 23:04:24 -0700
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
c186282 <c186282@nnada.net> writes:
On 6/14/25 5:25 AM, Keith Thompson wrote:[...]
c186282 <c186282@nnada.net> writes:
[...]
Where are you getting your information? There are no plans for
Python 4.
Nonsense ... search on it.
I did.
The PLAN is far fewer diffs than between P2 and P3,
just more optimization.
I'd say expect early releases within a year.
What is the basis for that claim?
Maybe you're right. If so, you shouldn't have any difficulty citing a
credible source.
[...]
No idea if this is credible or not:
https://www.geeksforgeeks.org/python/latest-update-on-python-4/
but it popped up right at the top of my search results.
I have no dog in this fight.
No idea if this is credible or not:
https://www.geeksforgeeks.org/python/latest-update-on-python-4/
but it popped up right at the top of my search results.
I have no dog in this fight.
That article does not suggest that a Python 4 release is likely
any time soon.
On Sun, 15 Jun 2025 14:46:24 +0100, Brian Morrison wrote:I see the AI results at the top of my search output, sometimes they're
No idea if this is credible or not:
https://www.geeksforgeeks.org/python/latest-update-on-python-4/
but it popped up right at the top of my search results.
You get points for using a search instead of AI. ;)
Seems a reasonable bunch of points. Of course Guido is no longerIndeed, and python has been a fairly big success on the whole.
BDFL, so I don’t think his opinions automatically count for more than anybody else’s. But he still gets the respect, of course.
On Sun, 15 Jun 2025 13:44:40 -0700
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
I have no dog in this fight.
That article does not suggest that a Python 4 release is likely
any time soon.
The way I read it, it's not a no, and it's not really a yes. But python
3.99 could eventually happen and they may get bored with the minor
number incrementing at some point.
I still struggle with syntax that needs indents to be there rather
than simply being a reading aid.
c186282 <c186282@nnada.net> writes:
On 6/14/25 5:25 AM, Keith Thompson wrote:
c186282 <c186282@nnada.net> writes:
[...]
Frankly, Python is just generally 'better' these days.Where are you getting your information? There are no plans for
Maybe not AS 'concise' but more 'readable' AND easier
to understand six months from now. The speed is now
'adequate' and Python-4 is supposed to be even faster.
Python 4.
Nonsense ... search on it.
I did.
The PLAN is far fewer diffs than between P2 and P3,
just more optimization.
I'd say expect early releases within a year.
What is the basis for that claim?
Maybe you're right. If so, you shouldn't have any difficulty citing a credible source.
[...]
On 6/15/25 2:04 AM, Keith Thompson wrote:
c186282 <c186282@nnada.net> writes:
On 6/14/25 5:25 AM, Keith Thompson wrote:I did.
c186282 <c186282@nnada.net> writes:
[...]
Frankly, Python is just generally 'better' these days.Where are you getting your information? There are no plans for
Maybe not AS 'concise' but more 'readable' AND easier
to understand six months from now. The speed is now
'adequate' and Python-4 is supposed to be even faster.
Python 4.
Nonsense ... search on it.
Umm ... I've seen a lot of juicy details
about Py4 over the past year .....
No, it won't show up this year - but MAYBE
next year. In any case they promise high
compatibility with Py3. The goal is more
'optimization' than underlying structure.
The PLAN is far fewer diffs than between P2 and P3,
just more optimization.
I'd say expect early releases within a year.
What is the basis for that claim? Maybe you're right. If so, you
shouldn't have any difficulty citing a credible source.
[...]
Wanna pay me for that much re-research ?
This is usenet - take what you can get.
In any case, Python development is hardly
a big secret. Do some searching.
c186282 <c186282@nnada.net> writes:
On 6/15/25 2:04 AM, Keith Thompson wrote:
c186282 <c186282@nnada.net> writes:
On 6/14/25 5:25 AM, Keith Thompson wrote:I did.
c186282 <c186282@nnada.net> writes:
[...]
Frankly, Python is just generally 'better' these days.Where are you getting your information? There are no plans for
Maybe not AS 'concise' but more 'readable' AND easier
to understand six months from now. The speed is now
'adequate' and Python-4 is supposed to be even faster.
Python 4.
Nonsense ... search on it.
Umm ... I've seen a lot of juicy details
about Py4 over the past year .....
No, it won't show up this year - but MAYBE
next year. In any case they promise high
compatibility with Py3. The goal is more
'optimization' than underlying structure.
The PLAN is far fewer diffs than between P2 and P3,
just more optimization.
I'd say expect early releases within a year.
What is the basis for that claim? Maybe you're right. If so, you
shouldn't have any difficulty citing a credible source.
[...]
Wanna pay me for that much re-research ?
No, I'm asking you to support a remarkable claim that *you* made.
If what you say is true, it would be very interesting and I'd want
to know more about it.
This is usenet - take what you can get.
In any case, Python development is hardly
a big secret. Do some searching.
You claimed that I could easily verify that there are plans for
Python 4 by searching for it. I searched for it, and found that
there are no such plans.
On 6/18/25 12:27 PM, Keith Thompson wrote:
c186282 <c186282@nnada.net> writes:
On 6/15/25 2:04 AM, Keith Thompson wrote:No, I'm asking you to support a remarkable claim that *you* made.
c186282 <c186282@nnada.net> writes:
On 6/14/25 5:25 AM, Keith Thompson wrote:I did.
c186282 <c186282@nnada.net> writes:
[...]
Frankly, Python is just generally 'better' these days.Where are you getting your information? There are no plans for
Maybe not AS 'concise' but more 'readable' AND easier
to understand six months from now. The speed is now
'adequate' and Python-4 is supposed to be even faster.
Python 4.
Nonsense ... search on it.
Umm ... I've seen a lot of juicy details
about Py4 over the past year .....
No, it won't show up this year - but MAYBE
next year. In any case they promise high
compatibility with Py3. The goal is more
'optimization' than underlying structure.
The PLAN is far fewer diffs than between P2 and P3,
just more optimization.
I'd say expect early releases within a year.
What is the basis for that claim? Maybe you're right. If so, you
shouldn't have any difficulty citing a credible source.
[...]
Wanna pay me for that much re-research ?
If what you say is true, it would be very interesting and I'd want
to know more about it.
This is usenet - take what you can get.You claimed that I could easily verify that there are plans for
In any case, Python development is hardly
a big secret. Do some searching.
Python 4 by searching for it. I searched for it, and found that
there are no such plans.
????????
https://blog.bytescrum.com/the-future-of-python-what-to-expect-in-python-40
https://builtin.com/software-engineering-perspectives/python-4
https://medium.com/@etherservices.mohandgm/python-4-0-and-beyond-what-lies-ahead-34d39ba6e953
https://www.codewithc.com/when-python-4-predictions-and-expectations-for-python-4/
https://techinsightdaily.com/227/python-4-0-whats-new-and-what-you-need-to-know/
And on and on and on ...
WHY do you pretend there's no info ????????
c186282 <c186282@nnada.net> writes:
On 6/18/25 12:27 PM, Keith Thompson wrote:
c186282 <c186282@nnada.net> writes:
On 6/15/25 2:04 AM, Keith Thompson wrote:No, I'm asking you to support a remarkable claim that *you* made.
c186282 <c186282@nnada.net> writes:
On 6/14/25 5:25 AM, Keith Thompson wrote:I did.
c186282 <c186282@nnada.net> writes:
[...]
Frankly, Python is just generally 'better' these days.Where are you getting your information? There are no plans for
Maybe not AS 'concise' but more 'readable' AND easier
to understand six months from now. The speed is now
'adequate' and Python-4 is supposed to be even faster.
Python 4.
Nonsense ... search on it.
Umm ... I've seen a lot of juicy details
about Py4 over the past year .....
No, it won't show up this year - but MAYBE
next year. In any case they promise high
compatibility with Py3. The goal is more
'optimization' than underlying structure.
The PLAN is far fewer diffs than between P2 and P3,
just more optimization.
I'd say expect early releases within a year.
What is the basis for that claim? Maybe you're right. If so, you
shouldn't have any difficulty citing a credible source.
[...]
Wanna pay me for that much re-research ?
If what you say is true, it would be very interesting and I'd want
to know more about it.
This is usenet - take what you can get.You claimed that I could easily verify that there are plans for
In any case, Python development is hardly
a big secret. Do some searching.
Python 4 by searching for it. I searched for it, and found that
there are no such plans.
????????
https://blog.bytescrum.com/the-future-of-python-what-to-expect-in-python-40
Speculation.
"As of now, there is no official release date for Python 4.0. The Python Software Foundation (PSF) has not announced any specific timeline for
its release."
https://builtin.com/software-engineering-perspectives/python-4
Did you actually read that one? "Python 4.0 is unlikely to be released
due to compatibility issues experienced during the transition from
Python 2 to Python 3. Here’s more on why Python 4.0 won’t happen, how Python 3 is being improved and what it would take to make Python 4.0 a reality."
https://medium.com/@etherservices.mohandgm/python-4-0-and-beyond-what-lies-ahead-34d39ba6e953
The author thinks there's going to be a Python 4 -- or thought so 2
years ago, when the article was written. I see no evidence that the
author has any inside information.
https://www.codewithc.com/when-python-4-predictions-and-expectations-for-python-4/
Speculation from late 2023. "As of now, the official release date for
Python 4 remains shrouded in mystery. However, if we paint a speculative picture based on previous release patterns, we might be looking at
Python 4 making its grand entrance somewhere in the mid-2020s. But hey, don’t hold me to that—Python’s release timeline can be as unpredictable as Delhi’s weather!"
https://techinsightdaily.com/227/python-4-0-whats-new-and-what-you-need-to-know/
Speculation from early 2023. The author talks about Python 4.0 in the present tense.
"Python 4.0 will also include improvements to the standard library. One
of the most significant improvements is the addition of a new "pathlib" module, which provides a more modern and object-oriented way to work
with file paths. The "pathlib" module will make it easier to write cross-platform code that works on Windows, Mac, and Linux."
pathlib was added in Python 3.4, released in 2014, 9 years before the
article was written.
And on and on and on ...
WHY do you pretend there's no info ????????
I pretended nothing. Of course there's going to be speculation
about a future Python 4 release. Guido van Rossum, the creator
of Python, has said explicitly that Python 4.0 will never arrive.
Admittedly he is no longer the BDFL, but I'm not aware of any
changes in that policy.
You told me that a simple search would support your claim and
initially refused to provide links. A simple search turned up
multiple credible sources saying that there are no plans for Python
4.0. You've posted some links that appear to be speculative (and
as I said, such speculation is unsurprising), and none from insiders.
*If* a Python 4 release is planned for the next couple of years or so,
it's a well kept secret.
Will you consider the possibility that you might be mistaken? Or,
if you're right, can you provide a link to something on python.org
that supports your claim?
There WILL be a Python-4 ... have no doubts. Developers[...]
will work at it obsessively.
Figure at least one year, maybe two.
[python]
PERL *can* be concise. It's also closer to a 'shell-script'
language, which makes it more challenging to write AND
understand six months later.
Frankly, Python is just generally 'better' these days.
Maybe not AS 'concise' but more 'readable' AND easier
to understand six months from now. The speed is now
'adequate' and Python-4 is supposed to be even faster.
There is some computer stuff that really should be done
in 'C' (I remember when it was the cool NEW lang !) ...
but now I'm far more likely to write in Python for the
abovementioned reasons.
And hey, BASIC still exists ... though not as nicely
structured it can STILL get the job done. Also consider
one of the 'C-shells'.
Since the 60s, seems like EVERYBODY had their "better
idea" about programming languages and styles. However
only a very FEW have stood the test of time. I can
still write some COBOL and FORTRAN ... occasionally
do so Just For Fun ... but their overall utility has
greatly diminished compared to later langs.
EVERYBODY had their "better idea"appears to me, on the longer time scale, unnecessarily
(I *do* still often write in PASCAL though - see
it as a kind of 'poetry' :-)
Just recently I picked a piece of old BASIC code - granted,
it was not one of the fancier new BASIC dialects but back
from the "glory mainframe days"
On Wed, 6 Aug 2025 16:30:36 +0200
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
Just recently I picked a piece of old BASIC code - granted,
it was not one of the fancier new BASIC dialects but back
from the "glory mainframe days"
Yeah, the Elder BASICs are a different story. FreeBasic made a fairly
decent language out of the QB lineage, though - still use that semi- regularly for proof-of-concept stuff and quick li'l one-off utilities.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,064 |
Nodes: | 10 (0 / 10) |
Uptime: | 148:04:00 |
Calls: | 13,691 |
Calls today: | 1 |
Files: | 186,936 |
D/L today: |
33 files (6,120K bytes) |
Messages: | 2,410,932 |