Why do glob.glob and pathlib.Path.glob treat hidden files differently? : <p>Consider this folder containing two files:</p>

<pre><code>test/
    foo
    .bar
</code></pre>

<p>Calling <a href="https://docs.python.org/3/library/glob.html#glob.glob" rel="noreferrer"><code>glob.glob('*')</code></a> on this folder won't list the hidden <code>.bar</code> file:</p>

<pre><code>&gt;&gt;&gt; glob.glob('test/*')
['test/foo']
</code></pre>

<p>But <a href="https://docs.python.org/3/library/pathlib.html#pathlib.Path.glob" rel="noreferrer"><code>pathlib.Path.glob('*')</code></a> will:</p>

<pre><code>&gt;&gt;&gt; list(Path('test').glob('*'))
[PosixPath('test/.bar'), PosixPath('test/foo')]
</code></pre>

<p>I'd like to know if this is intended or possibly a bug/oversight.</p>

<hr>

<p>The <a href="https://docs.python.org/3/library/glob.html" rel="noreferrer"><code>glob</code> module documentation</a> states that files starting with a dot are special cased:</p>

<blockquote>
  <p>glob treats filenames beginning with a dot (.) as special cases</p>
</blockquote>

<p>Meaning that the result given by <code>glob.glob('*')</code> is intended. But what about pathlib's <code>glob</code>? I couldn't find any relevant information in the docs. Is this the intended behavior? Shouldn't both functions produce the same results?</p>
