Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotMB to Lobste.rsEnglish · 12 hours ago

Sharing a mutable reference between Rust and Python

blog.lilyf.org

external-link
message-square
0
fedilink
1
external-link

Sharing a mutable reference between Rust and Python

blog.lilyf.org

RSS BotMB to Lobste.rsEnglish · 12 hours ago
message-square
0
fedilink
Sharing a mutable reference with Python
blog.lilyf.org
external-link
Background As part of my ongoing project to reimplement Django’s templating language in Rust, I have been adding support for custom template tags. Simple tags The simplest custom tag will look something like: # time_tags.py from datetime import datetime from django import template register = template.Library() @register.simple_tag def time(format_string): now = datetime.now() return now.strftime(format_string) # time_tags.py from datetime import datetime from django import template register = template.Library() @register.simple_tag def current_time(format_string): return datetime.now().strftime(format_string)

Comments

alert-triangle
You must log in or register to comment.

Lobste.rs

lobsters

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !lobsters@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

RSS Feed of lobste.rs

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 15 users / day
  • 121 users / week
  • 393 users / month
  • 1.28K users / 6 months
  • 2 local subscribers
  • 250 subscribers
  • 7.48K Posts
  • 372 Comments
  • Modlog
  • mods:
  • patrick
  • RSS Bot
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org