TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Laboratory, a Python port of GitHub's Scientist library for refactoring

153 点作者 buttscicles超过 9 年前

6 条评论

nubs超过 9 年前
Here&#x27;s some other ports of Scientist I&#x27;ve come across as well:<p>PHP<p><a href="https:&#x2F;&#x2F;github.com&#x2F;LartTyler&#x2F;Analyst" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;LartTyler&#x2F;Analyst</a><p>Javascript<p><a href="https:&#x2F;&#x2F;github.com&#x2F;trello&#x2F;scientist" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;trello&#x2F;scientist</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;Runnable&#x2F;scientist" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Runnable&#x2F;scientist</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;jirwin&#x2F;labrat" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jirwin&#x2F;labrat</a>
评论 #11105934 未加载
lasdfas超过 9 年前
I imagine this can only work on getters? How do you use this when code makes state changes?
评论 #11105359 未加载
评论 #11105311 未加载
jack_jennings超过 9 年前
Before clicking the link I wondered how this would translate the block-based Ruby API into Python. Using Python&#x27;s with statement is quite nice here, I think.<p>The with statement is one of my favorite additions to the language. It&#x27;s a really flexible syntax to encapsulate control flow, exceptions, necessary cleanup steps… etc. etc.
评论 #11106773 未加载
ByteJuggler超过 9 年前
Another Python one: <a href="https:&#x2F;&#x2F;github.com&#x2F;staticshock&#x2F;scientist.py" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;staticshock&#x2F;scientist.py</a>
agentultra超过 9 年前
Cool! Thanks for the tool!<p>&gt; Imagine you&#x27;ve implemented a complex caching strategy for some objects in your database and a stale cache is simply not acceptable.<p>I hope you have a formal specification of that cache. That will help ensure your design is correct in the first place before you even get to running it in code.<p>I shall be playing with this soon. Cheers!
jonathankoren超过 9 年前
Python? Isn&#x27;t Python dying? ;) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11100251" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11100251</a>